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 cc1cd2b

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 a0df91c commit cc1cd2b
Copy full SHA for cc1cd2b

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
@@ -273,10 +273,11 @@ class NODE_EXTERN MultiIsolatePlatform : public v8::Platform {
273273
// This function may only be called once per `Isolate`.
274274
virtual void RegisterIsolate(v8::Isolate* isolate,
275275
struct uv_loop_s* loop) = 0;
276-
// This needs to be called right before calling `Isolate::Dispose()`.
276+
277277
// This function may only be called once per `Isolate`, and discard any
278278
// pending delayed tasks scheduled for that isolate.
279279
virtual void UnregisterIsolate(v8::Isolate* isolate) = 0;
280+
280281
// The platform should call the passed function once all state associated
281282
// with the given isolate has been cleaned up. This can, but does not have to,
282283
// 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.