Unverified Commit bafd8088 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Anna Henningsen
Browse files

src: ensure no more platform foreground tasks after Deinit

Node first calls `Isolate::Dispose`, then
`NodePlatform::UnregisterIsolate`.
This again calls `PerIsolatePlatformData::Shutdown`, which (before this
patch) called `FlushForegroundTasksInternal`, which might call
`RunForegroundTask` if it finds foreground tasks to be executed. This
will fail however, since `Isolate::GetCurrent` was already reset during
`Isolate::Dispose`.
Hence remove the check to `FlushForegroundTasksInternal` and add checks
instead that no more foreground tasks are scheduled.

Refs: https://github.com/v8/node/pull/86

PR-URL: https://github.com/nodejs/node/pull/25653


Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent 5109e426
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment