Skip to content

Commit

Permalink
fix(jsc): fix jscctx finalize crash
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao committed Dec 24, 2024
1 parent 434b3c0 commit ab54c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/js/src/napi/jsc/jsc_ctx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ JSCCtx::JSCCtx(JSContextGroupRef group, std::weak_ptr<VM> vm): vm_(vm) {
}

JSCCtx::~JSCCtx() {
JSGlobalContextRelease(context_);
for (auto& [key, item] : constructor_data_holder_) {
item->prototype = nullptr;
if (global_constructor_data_mgr) {
global_constructor_data_mgr->ClearConstructorDataPtr(item.get());
}
}
JSGlobalContextRelease(context_);
}

JSValueRef InvokeJsCallback(JSContextRef ctx,
Expand Down

0 comments on commit ab54c7a

Please sign in to comment.