summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cfxjse_engine.cpp')
-rw-r--r--fxjs/cfxjse_engine.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index a4fc0a2bdb..1812d02e50 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -805,7 +805,9 @@ v8::Local<v8::Value> CFXJSE_Engine::NewXFAObject(
v8::EscapableHandleScope scope(GetIsolate());
v8::Local<v8::FunctionTemplate> klass =
v8::Local<v8::FunctionTemplate>::New(GetIsolate(), tmpl);
- v8::Local<v8::Object> object = klass->InstanceTemplate()->NewInstance();
+ v8::Local<v8::Object> object = klass->InstanceTemplate()
+ ->NewInstance(m_JsContext->GetContext())
+ .ToLocalChecked();
FXJSE_UpdateObjectBinding(object, obj);
return scope.Escape(object);
}