summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_engine.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-02-01 22:06:21 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-01 22:06:21 +0000
commit59790cef1a09565e8b6799141cf45455ef2dc752 (patch)
tree6d4aa8bcb68ac79360c386c37b7d368854d5e313 /fxjs/cfxjse_engine.cpp
parent270283669b1f53edfce8b96a579e973c5de5f205 (diff)
downloadpdfium-59790cef1a09565e8b6799141cf45455ef2dc752.tar.xz
Make CFXJSE-created contexts refer to their CFXJS counteparts.chromium/3337
Bug: 773229 Change-Id: Ic3774c7f6abe3a195bbe09b91d91c549d4d7ac46 Reviewed-on: https://pdfium-review.googlesource.com/25110 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_engine.cpp')
-rw-r--r--fxjs/cfxjse_engine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index 6b3ea1014d..198e1d5fa8 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -97,6 +97,7 @@ CFXJSE_Engine::CFXJSE_Engine(CXFA_Document* pDocument,
: CJS_V8(fxjs_engine->GetIsolate()),
m_pDocument(pDocument),
m_JsContext(CFXJSE_Context::Create(fxjs_engine->GetIsolate(),
+ fxjs_engine,
&GlobalClassDescriptor,
pDocument->GetRoot())),
m_pJsClass(nullptr),
@@ -431,7 +432,7 @@ CFXJSE_Context* CFXJSE_Engine::CreateVariablesContext(CXFA_Node* pScriptNode,
return nullptr;
auto pNewContext =
- CFXJSE_Context::Create(GetIsolate(), &VariablesClassDescriptor,
+ CFXJSE_Context::Create(GetIsolate(), nullptr, &VariablesClassDescriptor,
new CXFA_ThisProxy(pSubform, pScriptNode));
RemoveBuiltInObjs(pNewContext.get());
pNewContext->EnableCompatibleMode();