summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-06-05 18:24:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-05 18:24:12 +0000
commite9f7db9dbb2c5b9d1953c6643e1c38f82130f98b (patch)
tree8918f344abae83984dcd976dbe2a19bf0b0bcc1c /xfa/fxfa/parser/cxfa_document.h
parent22de733a693f27c90f58ee13cfd398c55d9a064f (diff)
downloadpdfium-e9f7db9dbb2c5b9d1953c6643e1c38f82130f98b.tar.xz
[xfa] Make the event context available when calling back in XFA
When calling into the XFA JS engine with a request for a non-XFA JS call which accesses the EventContext we would get a crash in XFA as we never set the context. This CL changes the XFA code to accept the CJS_Runtime instead of the CFXJS_Engine and then calls NewEventContext before executing JS scripts. This will correctly setup the event context as needed for any JS callbacks. Bug: pdfium:1003 Change-Id: Icf202252b2e6e56afdf0d1766a32a893935a2fd3 Reviewed-on: https://pdfium-review.googlesource.com/33930 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document.h')
-rw-r--r--xfa/fxfa/parser/cxfa_document.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.h b/xfa/fxfa/parser/cxfa_document.h
index f924abb989..795da004cc 100644
--- a/xfa/fxfa/parser/cxfa_document.h
+++ b/xfa/fxfa/parser/cxfa_document.h
@@ -41,7 +41,7 @@ enum XFA_DocFlag {
};
class CFXJSE_Engine;
-class CFXJS_Engine;
+class CJS_Runtime;
class CScript_DataWindow;
class CScript_EventPseudoModel;
class CScript_HostPseudoModel;
@@ -58,7 +58,7 @@ class CXFA_Document : public CXFA_NodeOwner {
explicit CXFA_Document(CXFA_FFNotify* notify);
~CXFA_Document() override;
- CFXJSE_Engine* InitScriptContext(CFXJS_Engine* fxjs_engine);
+ CFXJSE_Engine* InitScriptContext(CJS_Runtime* fxjs_runtime);
CXFA_Node* GetRoot() const { return m_pRootNode; }
CXFA_FFNotify* GetNotify() const { return notify_.Get(); }