diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-02-08 21:01:01 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-08 21:01:01 +0000 |
commit | 3645652fb6cad1f94c9647f033a8e300bc37d521 (patch) | |
tree | 136dd8524455efdc4bbc32eed7914d3a3b5376e0 /fxjs/xfa/cjx_hostpseudomodel.cpp | |
parent | 3c62d20a385d31315a392206de53c9fe72a08db1 (diff) | |
download | pdfium-3645652fb6cad1f94c9647f033a8e300bc37d521.tar.xz |
Move XFA-specific methods out of CJS_V8.
These belong more properly in CFXJS_Engine, and a small amount of
casting is required to get to the sub-class.
Change-Id: Id954d182b7a7d51fe0a522c04a50a1b362746c72
Reviewed-on: https://pdfium-review.googlesource.com/26050
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/xfa/cjx_hostpseudomodel.cpp')
-rw-r--r-- | fxjs/xfa/cjx_hostpseudomodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fxjs/xfa/cjx_hostpseudomodel.cpp b/fxjs/xfa/cjx_hostpseudomodel.cpp index 319761d19a..fd570990bc 100644 --- a/fxjs/xfa/cjx_hostpseudomodel.cpp +++ b/fxjs/xfa/cjx_hostpseudomodel.cpp @@ -279,7 +279,8 @@ CJS_Return CJX_HostPseudoModel::openList( CXFA_Node* pNode = nullptr; if (params[0]->IsObject()) { - pNode = ToNode(runtime->ToXFAObject(params[0])); + pNode = + ToNode(static_cast<CFXJSE_Engine*>(runtime)->ToXFAObject(params[0])); } else if (params[0]->IsString()) { CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext(); if (!pScriptContext) @@ -439,7 +440,8 @@ CJS_Return CJX_HostPseudoModel::setFocus( CXFA_Node* pNode = nullptr; if (params.size() >= 1) { if (params[0]->IsObject()) { - pNode = ToNode(runtime->ToXFAObject(params[0])); + pNode = + ToNode(static_cast<CFXJSE_Engine*>(runtime)->ToXFAObject(params[0])); } else if (params[0]->IsString()) { CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext(); if (!pScriptContext) |