Revert "src: keep main-thread Isolate attached to platform during Dispose"

This reverts commit e460f8cf43.

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 <joyeec9h3@gmail.com>
This commit is contained in:
Anna Henningsen authored and Michaël Zasso committed 2020-04-28 16:00:51 +02:00
1 parent f5b60ec8dd
commit 40c5d58095
1 file changed
+1 -5
+1 -5
View File
@@ -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() {