Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1454)

Unified Diff: xfa/fxfa/parser/xfa_script_imp.cpp

Issue 2083453003: Split the XFA_OBJECTTYPE enum into two parts. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix == nullptr Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_parser_imp.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_script_imp.cpp
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index 7a97899c9617d08b77e16a36d6c95ce7ed48bfe4..e9b70202bec881cda485848f869e1417d7635148 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -156,14 +156,13 @@ void CXFA_ScriptContext::GlobalPropertySetter(CFXJSE_Value* pObject,
XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Attributes;
CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject());
- if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
+ if (lpOrginalNode->IsVariablesThis())
pRefNode = ToNode(lpCurNode);
- }
if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue,
dwFlag, TRUE)) {
return;
}
- if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
+ if (lpOrginalNode->IsVariablesThis()) {
if (pValue && pValue->IsUndefined()) {
pObject->SetObjectOwnProperty(szPropName, pValue);
return;
@@ -226,7 +225,7 @@ void CXFA_ScriptContext::GlobalPropertyGetter(CFXJSE_Value* pObject,
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties |
XFA_RESOLVENODE_Attributes;
CXFA_Node* pRefNode = ToNode(lpScriptContext->GetThisObject());
- if (pOriginalObject->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) {
+ if (pOriginalObject->IsVariablesThis()) {
pRefNode = ToNode(lpCurNode);
}
if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsStringC(), pValue,
@@ -433,7 +432,7 @@ CFXJSE_Context* CXFA_ScriptContext::CreateVariablesContext(
}
CXFA_Object* CXFA_ScriptContext::GetVariablesThis(CXFA_Object* pObject,
FX_BOOL bScriptNode) {
- if (pObject->GetObjectType() != XFA_OBJECTTYPE_VariablesThis)
+ if (!pObject->IsVariablesThis())
return pObject;
CXFA_ThisProxy* pProxy = static_cast<CXFA_ThisProxy*>(pObject);
« no previous file with comments | « xfa/fxfa/parser/xfa_parser_imp.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698