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
  • Loading branch information
addaleax committed Feb 18, 2020
1 parent 023ed84 commit 06eff80
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 06eff80

Please sign in to comment.