• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #include "xfa/fxfa/parser/cxfa_thisproxy.h"
8 
9 #include "fxjs/xfa/cjx_object.h"
10 #include "xfa/fxfa/parser/cxfa_document.h"
11 #include "xfa/fxfa/parser/cxfa_node.h"
12 #include "xfa/fxfa/parser/cxfa_script.h"
13 
CXFA_ThisProxy(CXFA_Node * pThisNode,CXFA_Script * pScriptNode)14 CXFA_ThisProxy::CXFA_ThisProxy(CXFA_Node* pThisNode, CXFA_Script* pScriptNode)
15     : CXFA_Object(
16           pThisNode->GetDocument(),
17           XFA_ObjectType::ThisProxy,
18           XFA_Element::Object,
19           cppgc::MakeGarbageCollected<CJX_Object>(
20               pThisNode->GetDocument()->GetHeap()->GetAllocationHandle(),
21               this)),
22       m_pThisNode(pThisNode),
23       m_pScriptNode(pScriptNode) {}
24 
25 CXFA_ThisProxy::~CXFA_ThisProxy() = default;
26 
Trace(cppgc::Visitor * visitor) const27 void CXFA_ThisProxy::Trace(cppgc::Visitor* visitor) const {
28   CXFA_Object::Trace(visitor);
29   visitor->Trace(m_pThisNode);
30   visitor->Trace(m_pScriptNode);
31 }
32