Skip to content

Commit

Permalink
fix: Context::Global() need Context::Scope
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Sep 21, 2024
1 parent 3a0ea05 commit 13e58bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bridge/bindings/v8/v8_member_installer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace webf {
void MemberInstaller::InstallFunctions(ExecutingContext* context,
std::initializer_list<FunctionConfig> config) {
v8::Isolate* isolate = context->ctx();
v8::Local<v8::Context> v8_context = isolate->GetCurrentContext();
v8::Local<v8::Context> v8_context = v8::Context::New(isolate);
v8::Context::Scope context_scope(v8_context);
v8::Local<v8::Object> global = v8_context->Global();

for (const auto& function : config) {
Expand Down

0 comments on commit 13e58bf

Please sign in to comment.