We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 673a92b commit 4923cdcCopy full SHA for 4923cdc
NativeScript/runtime/Interop.mm
@@ -41,9 +41,8 @@
41
Isolate::Scope isolate_scope(runtimeIsolate);
42
HandleScope handle_scope(runtimeIsolate);
43
Local<Value> callback = wrapper->callback_->Get(runtimeIsolate);
44
- if (!callback.IsEmpty() && callback->IsObject()) {
45
- Local<Context> context = callback.As<Object>()->CreationContext();
46
- Isolate* isolate = context->GetIsolate();
+ Isolate* isolate = wrapper->isolate_;
+ if (Runtime::IsAlive(isolate) && !callback.IsEmpty() && callback->IsObject()) {
47
v8::Locker locker(isolate);
48
Isolate::Scope isolate_scope(isolate);
49
HandleScope handle_scope(isolate);
0 commit comments