From aa57f34ac1f5970a6065d495fad1242185df3ec0 Mon Sep 17 00:00:00 2001 From: Vektor Date: Sat, 12 Dec 2020 10:14:08 +0100 Subject: [PATCH] make v8 shutdown platform dependent Former-commit-id: e360b7c1ce883adc9526307bb2a325c051360587 --- src/CNodeScriptRuntime.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CNodeScriptRuntime.cpp b/src/CNodeScriptRuntime.cpp index 12fb0f20..9a049c3e 100644 --- a/src/CNodeScriptRuntime.cpp +++ b/src/CNodeScriptRuntime.cpp @@ -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()); }