diff options
author | Lei Zhang <thestig@chromium.org> | 2018-08-31 17:44:51 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-31 17:44:51 +0000 |
commit | 53701cd5a8e71137a00e4a1d7803761317b7574b (patch) | |
tree | ffa93276b8bca7237c8827c1ac69b8dcf52fbf59 /fxjs/cfxjse_engine.h | |
parent | 53038b6390ffbbe5d4f6efd14bdde9a4f05a3f4e (diff) | |
download | pdfium-53701cd5a8e71137a00e4a1d7803761317b7574b.tar.xz |
Use more UnownedPtrs in CFXJSE_Engine.
Change-Id: If577500905f5bc5bb631718e9c87aa03ee6bee5a
Reviewed-on: https://pdfium-review.googlesource.com/41571
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_engine.h')
-rw-r--r-- | fxjs/cfxjse_engine.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fxjs/cfxjse_engine.h b/fxjs/cfxjse_engine.h index 2279eea8e4..a766e268a4 100644 --- a/fxjs/cfxjse_engine.h +++ b/fxjs/cfxjse_engine.h @@ -67,7 +67,7 @@ class CFXJSE_Engine final : public CFX_V8 { CXFA_Node* bindNode); CFXJSE_Value* GetJSValueFromMap(CXFA_Object* pObject); void AddToCacheList(std::unique_ptr<CXFA_List> pList); - CXFA_Object* GetThisObject() const { return m_pThisObject; } + CXFA_Object* GetThisObject() const { return m_pThisObject.Get(); } int32_t GetIndexByName(CXFA_Node* refNode); int32_t GetIndexByClassName(CXFA_Node* refNode); @@ -75,7 +75,7 @@ class CFXJSE_Engine final : public CFX_V8 { void SetNodesOfRunScript(std::vector<CXFA_Node*>* pArray); void AddNodesOfRunScript(CXFA_Node* pNode); - CFXJSE_Class* GetJseNormalClass(); + CFXJSE_Class* GetJseNormalClass() const { return m_pJsClass.Get(); } void SetRunAtType(XFA_AttributeEnum eRunAt) { m_eRunAtType = eRunAt; } bool IsRunAtClient() { return m_eRunAtType != XFA_AttributeEnum::Server; } @@ -108,7 +108,7 @@ class CFXJSE_Engine final : public CFX_V8 { UnownedPtr<CJS_Runtime> const m_pSubordinateRuntime; UnownedPtr<CXFA_Document> const m_pDocument; std::unique_ptr<CFXJSE_Context> m_JsContext; - CFXJSE_Class* m_pJsClass = nullptr; + UnownedPtr<CFXJSE_Class> m_pJsClass; CXFA_Script::Type m_eScriptType = CXFA_Script::Type::Unknown; std::map<CXFA_Object*, std::unique_ptr<CFXJSE_Value>> m_mapObjectToValue; std::map<CXFA_Object*, std::unique_ptr<CFXJSE_Context>> @@ -117,10 +117,10 @@ class CFXJSE_Engine final : public CFX_V8 { std::vector<CXFA_Node*> m_upObjectArray; // CacheList holds the List items so we can clean them up when we're done. std::vector<std::unique_ptr<CXFA_List>> m_CacheList; - std::vector<CXFA_Node*>* m_pScriptNodeArray = nullptr; + UnownedPtr<std::vector<CXFA_Node*>> m_pScriptNodeArray; const std::unique_ptr<CFXJSE_ResolveProcessor> m_ResolveProcessor; std::unique_ptr<CFXJSE_FormCalcContext> m_FM2JSContext; - CXFA_Object* m_pThisObject = nullptr; + UnownedPtr<CXFA_Object> m_pThisObject; XFA_AttributeEnum m_eRunAtType = XFA_AttributeEnum::Client; }; |