summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_engine.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-28 23:12:22 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-28 23:12:22 +0000
commitda379c7af512aa7baa221d38b04c8aa9912b4e02 (patch)
tree2d98da7f03c36051aa96a372126020fc3eb94c12 /fxjs/cfxjse_engine.cpp
parentcf59f804ea8bc83fe0d70148de15a3b5cedc801f (diff)
downloadpdfium-da379c7af512aa7baa221d38b04c8aa9912b4e02.tar.xz
Stop using deprecated v8::ObjectTemplate::NewInstance().
Fix nits in affected files. Change-Id: I3a0363c9b7c28359fd1c7cea305e4f7705a228c2 Reviewed-on: https://pdfium-review.googlesource.com/41355 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
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);
}