Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-12-12 05:48:47 +0300
committerRich Trott <rtrott@gmail.com>2019-12-15 00:32:52 +0300
commit25447d82d34afb8c7f0f7e8fea10942586ef2d7c (patch)
tree24b876caa306b4d297717bc7adb8b59d0fa7ebb9 /src/node_main_instance.cc
parentf8018f289e36148ce712170ec22377798af12fc8 (diff)
src: unregister Isolate with platform before disposing
I previously thought the order of these calls was no longer relevant. I was wrong. This commit undoes the changes from 312c02d25e9, adds a comment explaining why I was wrong, and flips the order of the calls elsewhere for consistency, the latter having been the goal of 312c02d25e9. Fixes: https://github.com/nodejs/node/issues/30846 Refs: https://github.com/nodejs/node/pull/30181 PR-URL: https://github.com/nodejs/node/pull/30909 Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node_main_instance.cc')
-rw-r--r--src/node_main_instance.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_main_instance.cc b/src/node_main_instance.cc
index eea84772530..86a857299f6 100644
--- a/src/node_main_instance.cc
+++ b/src/node_main_instance.cc
@@ -99,8 +99,8 @@ NodeMainInstance::~NodeMainInstance() {
if (!owns_isolate_) {
return;
}
- isolate_->Dispose();
platform_->UnregisterIsolate(isolate_);
+ isolate_->Dispose();
}
int NodeMainInstance::Run() {