Skip to content

Commit

Permalink
make v8 shutdown platform dependent
Browse files Browse the repository at this point in the history
Former-commit-id: e360b7c
  • Loading branch information
martonp96 committed Dec 12, 2020
1 parent 448f7a2 commit aa57f34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/CNodeScriptRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,18 @@ void CNodeScriptRuntime::OnDispose()
} while (uv_loop_alive(uv_default_loop()));
}*/

#ifdef WIN32
v8::V8::Dispose();
v8::V8::ShutdownPlatform();
#else
platform->DrainTasks(isolate);
platform->CancelPendingDelayedTasks(isolate);
platform->UnregisterIsolate(isolate);

isolate->Dispose();
v8::V8::Dispose();
v8::V8::ShutdownPlatform();
platform.release();
#endif

//node::FreePlatform(platform.release());
}

0 comments on commit aa57f34

Please sign in to comment.