Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ab03c29

Browse filesBrowse files
codebyteretargos
authored andcommitted
src: isolate->Dispose() order consistency
PR-URL: #30181 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com>
1 parent b0837fe commit ab03c29
Copy full SHA for ab03c29

File tree

Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed
Open diff view settings
Collapse file

‎src/node.h‎

Copy file name to clipboardExpand all lines: src/node.h
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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.
Collapse file

‎src/node_worker.cc‎

Copy file name to clipboardExpand all lines: src/node_worker.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.