Skip to content

Commit

Permalink
fix: fix stack overflow with multiple thread.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Jan 12, 2022
1 parent 1545d0a commit a689caa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bridge/bindings/qjs/executing_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ ExecutionContext::ExecutionContext(int32_t contextId, const JSExceptionHandler&
if (m_runtime == nullptr) {
m_runtime = JS_NewRuntime();
}
// Avoid stack overflow when running in multiple threads.
JS_UpdateStackTop(m_runtime);
m_ctx = JS_NewContext(m_runtime);

timeOrigin = std::chrono::system_clock::now();
Expand Down

0 comments on commit a689caa

Please sign in to comment.