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: nodejs#31795
PR-URL: nodejs#31853
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
addaleax authored and targos committed Apr 25, 2020
1 parent 0509360 commit c0aad76
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/node_main_instance.cc
Original file line number Diff line number Diff line change
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 c0aad76

Please sign in to comment.