From 40c5d580952e3fca4e0cbca7b4b12f124e2aceb5 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 18 Feb 2020 20:21:45 +0100 Subject: [PATCH] Revert "src: keep main-thread Isolate attached to platform during Dispose" This reverts commit e460f8cf43863a5a8d73273ce311135ad3245699. It is no longer necessary after the previous commit, and restores consistency of the call order between the main thread code, the other call sites, and the documentation. Refs: https://github.com/nodejs/node/pull/31795 PR-URL: https://github.com/nodejs/node/pull/31853 Reviewed-By: Joyee Cheung --- src/node_main_instance.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/node_main_instance.cc b/src/node_main_instance.cc index 6f240d7e809f8e..998cf260de2a62 100644 --- a/src/node_main_instance.cc +++ b/src/node_main_instance.cc @@ -102,12 +102,8 @@ NodeMainInstance::~NodeMainInstance() { if (!owns_isolate_) { return; } - // TODO(addaleax): Reverse the order of these calls. The fact that we first - // dispose the Isolate is a temporary workaround for - // https://github.com/nodejs/node/issues/31752 -- V8 should not be posting - // platform tasks during Dispose(), but it does in some WASM edge cases. - isolate_->Dispose(); platform_->UnregisterIsolate(isolate_); + isolate_->Dispose(); } int NodeMainInstance::Run() {