File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -267,10 +267,11 @@ class NODE_EXTERN MultiIsolatePlatform : public v8::Platform {
267267 // This function may only be called once per `Isolate`.
268268 virtual void RegisterIsolate (v8::Isolate* isolate,
269269 struct uv_loop_s * loop) = 0;
270- // This needs to be called right before calling `Isolate::Dispose()`.
270+
271271 // This function may only be called once per `Isolate`, and discard any
272272 // pending delayed tasks scheduled for that isolate.
273273 virtual void UnregisterIsolate (v8::Isolate* isolate) = 0;
274+
274275 // The platform should call the passed function once all state associated
275276 // with the given isolate has been cleaned up. This can, but does not have to,
276277 // happen asynchronously.
Original file line number Diff line number Diff line change @@ -155,9 +155,9 @@ class WorkerThreadData {
155155 w_->platform_ ->AddIsolateFinishedCallback (isolate, [](void * data) {
156156 *static_cast <bool *>(data) = true ;
157157 }, &platform_finished);
158- w_->platform_ ->UnregisterIsolate (isolate);
159158
160159 isolate->Dispose ();
160+ w_->platform_ ->UnregisterIsolate (isolate);
161161
162162 // Wait until the platform has cleaned up all relevant resources.
163163 while (!platform_finished)
You can’t perform that action at this time.
0 commit comments