diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-01 16:06:07 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-01 16:06:07 +0000 |
commit | a85e5ca5f2dfadcf9f3812a8ef039d1f206833a4 (patch) | |
tree | 5d44e797d038158cdc19b14ac6951435eb85c912 /xfa/fxfa/parser/cxfa_thisproxy.cpp | |
parent | e5434b5531f2c081c1d69f67125b6665070ea969 (diff) | |
download | pdfium-a85e5ca5f2dfadcf9f3812a8ef039d1f206833a4.tar.xz |
Split JS methods out of CXFA_Object
This CL moves the javascript code from CXFA_Object to CJX_Object. The
Script_* methods are proxied to CJX_Object.
The ownership of the CJX_ object was removed from CXFA_Node and moved up
to CXFA_Object.
Change-Id: I58d286e6bb0151aa88d4f673bc7729987417bde6
Reviewed-on: https://pdfium-review.googlesource.com/17310
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_thisproxy.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_thisproxy.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_thisproxy.cpp b/xfa/fxfa/parser/cxfa_thisproxy.cpp index 55e676ecdc..6b84913afb 100644 --- a/xfa/fxfa/parser/cxfa_thisproxy.cpp +++ b/xfa/fxfa/parser/cxfa_thisproxy.cpp @@ -6,17 +6,17 @@ #include "xfa/fxfa/parser/cxfa_thisproxy.h" +#include "fxjs/cjx_object.h" +#include "third_party/base/ptr_util.h" #include "xfa/fxfa/parser/cxfa_node.h" CXFA_ThisProxy::CXFA_ThisProxy(CXFA_Node* pThisNode, CXFA_Node* pScriptNode) : CXFA_Object(pThisNode->GetDocument(), XFA_ObjectType::VariablesThis, XFA_Element::Unknown, - WideStringView()), - m_pThisNode(nullptr), - m_pScriptNode(nullptr) { - m_pThisNode = pThisNode; - m_pScriptNode = pScriptNode; -} + WideStringView(), + pdfium::MakeUnique<CJX_Object>(this)), + m_pThisNode(pThisNode), + m_pScriptNode(pScriptNode) {} CXFA_ThisProxy::~CXFA_ThisProxy() {} |