diff options
-rw-r--r-- | fxjs/cjs_globalarrays.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fxjs/cjs_globalarrays.cpp b/fxjs/cjs_globalarrays.cpp index 818b13f0e8..a697c18ac6 100644 --- a/fxjs/cjs_globalarrays.cpp +++ b/fxjs/cjs_globalarrays.cpp @@ -15,9 +15,8 @@ (rt)->SetConstArray((name), array); \ (rt)->DefineGlobalConst( \ (name), [](const v8::FunctionCallbackInfo<v8::Value>& info) { \ - CJS_Runtime* pCurrentRuntime = \ - CJS_Runtime::RuntimeFromIsolateCurrentContext( \ - info.GetIsolate()); \ + CJS_Object* pObj = CFXJS_Engine::GetObjectPrivate(info.Holder()); \ + CJS_Runtime* pCurrentRuntime = pObj->GetRuntime(); \ if (pCurrentRuntime) \ info.GetReturnValue().Set(pCurrentRuntime->GetConstArray(name)); \ }); \ |