From bd2d7a12fb2832ca6c6ccae947d2130b29888c0e Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Tue, 21 Dec 2021 21:36:58 +0100 Subject: [PATCH] Fix bug for old v8 --- src/bindings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bindings.cpp b/src/bindings.cpp index 8dfff3b..ae3bd3b 100644 --- a/src/bindings.cpp +++ b/src/bindings.cpp @@ -66,7 +66,8 @@ void start_v8_isolate(void *dll){ platformptr = platform.get(); platform.release(); //UBSAN complains if platform is destroyed when out of scope #else - v8::V8::InitializePlatform(v8::platform::CreateDefaultPlatform()); + platformptr = v8::platform::CreateDefaultPlatform(); + v8::V8::InitializePlatform(platformptr); #endif v8::V8::Initialize(); v8::Isolate::CreateParams create_params;