Skip to content

Commit

Permalink
fix(core): fix reload bug for inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
churchill-zhang authored and zoomchan-cxj committed Dec 7, 2022
1 parent de15dd4 commit 244dc8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion android/sdk/src/main/jni/src/bridge/entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ jlong InitInstance(JNIEnv* j_env,
engine = std::make_shared<Engine>();
reuse_engine_map[group] = std::make_pair(engine, 1);
runtime->SetEngine(engine);
engine->AsyncInit(param, std::move(engine_cb_map));
}
} else if (group != kDefaultEngineId) {
std::lock_guard<std::mutex> lock(engine_mutex);
Expand All @@ -589,13 +590,14 @@ jlong InitInstance(JNIEnv* j_env,
engine = std::make_shared<Engine>();
runtime->SetEngine(engine);
reuse_engine_map[group] = std::make_pair(engine, 1);
engine->AsyncInit(param, std::move(engine_cb_map));
}
} else { // kDefaultEngineId
TDF_BASE_DLOG(INFO) << "default create engine";
engine = std::make_shared<Engine>();
runtime->SetEngine(engine);
engine->AsyncInit(param, std::move(engine_cb_map));
}
engine->AsyncInit(param, std::move(engine_cb_map));
runtime->SetScope(engine->CreateScope("", std::move(scope_cb_map)));
TDF_BASE_DLOG(INFO) << "group = " << group;
runtime->SetGroupId(group);
Expand Down

0 comments on commit 244dc8f

Please sign in to comment.