Skip to content

Commit

Permalink
Revert "src: keep main-thread Isolate attached to platform during Dis…
Browse files Browse the repository at this point in the history
…pose"

This reverts commit e460f8c.

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: #31795
PR-URL: #31853
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
addaleax authored and MylesBorins committed Mar 11, 2020
1 parent 625d8f7 commit d8c927b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/node_main_instance.cc
Expand Up @@ -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() {
Expand Down

0 comments on commit d8c927b

Please sign in to comment.