Skip to content

Commit

Permalink
fix(android): fix exception caused by multiple instances
Browse files Browse the repository at this point in the history
  • Loading branch information
medns authored and zoomchan-cxj committed Nov 2, 2021
1 parent 9409cb2 commit 6db49c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/napi/v8/js_native_api_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ V8VM::V8VM() {
{
std::lock_guard<std::mutex> lock(mutex_);
if (platform_ != nullptr) {
#ifdef V8_X5_LITE
#if defined(V8_X5_LITE) && defined(THREAD_LOCAL_PLATFORM)
TDF_BASE_DLOG(INFO) << "InitializePlatform";
v8::V8::InitializePlatform(platform_.get());
#endif
Expand All @@ -250,7 +250,7 @@ V8VM::V8VM() {
platform_ = v8::platform::NewDefaultPlatform();
v8::V8::SetFlagsFromString("--wasm-disable-structured-cloning",
strlen("--wasm-disable-structured-cloning"));
#ifdef V8_X5_LITE
#if defined(V8_X5_LITE)
v8::V8::InitializePlatform(platform_.get(), true);
#else
v8::V8::InitializePlatform(platform_.get());
Expand Down

0 comments on commit 6db49c9

Please sign in to comment.