summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/cjs_context.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-15 16:44:55 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-15 16:44:55 -0700
commitb4694249b336d1c0bea9222880b49dcf9284791d (patch)
tree681a503d12000b78296bcacf4fce046922335950 /fpdfsdk/javascript/cjs_context.cpp
parent19cdfe4d73370b21709aefd9dce06cf463239fa1 (diff)
downloadpdfium-b4694249b336d1c0bea9222880b49dcf9284791d.tar.xz
Push v8::Isolate into CFXJS_Engine classchromium/2831
Nearly all the "loose" functions in FXJS become methods on the CFJXS_Engine. This is the "missing link" wrt some layering violatons that have been around forever. We can stop passing &m_ variables from CJS_ down into FXJS Initialization as a result. Review-Url: https://codereview.chromium.org/2245863002
Diffstat (limited to 'fpdfsdk/javascript/cjs_context.cpp')
-rw-r--r--fpdfsdk/javascript/cjs_context.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/cjs_context.cpp b/fpdfsdk/javascript/cjs_context.cpp
index 06abf7f48d..c37fdab738 100644
--- a/fpdfsdk/javascript/cjs_context.cpp
+++ b/fpdfsdk/javascript/cjs_context.cpp
@@ -29,7 +29,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
CFX_WideString* info) {
v8::Isolate::Scope isolate_scope(m_pRuntime->GetIsolate());
v8::HandleScope handle_scope(m_pRuntime->GetIsolate());
- v8::Local<v8::Context> context = m_pRuntime->NewJSContext();
+ v8::Local<v8::Context> context = m_pRuntime->NewLocalContext();
v8::Context::Scope context_scope(context);
if (m_bBusy) {
@@ -49,7 +49,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
CFX_WideString sErrorMessage;
int nRet = 0;
if (script.GetLength() > 0) {
- nRet = m_pRuntime->Execute(script.c_str(), &sErrorMessage);
+ nRet = m_pRuntime->ExecuteScript(script.c_str(), &sErrorMessage);
}
if (nRet < 0) {