summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-10-25 15:00:03 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-25 19:00:32 +0000
commit780a6339d5beee5cd7b138ad947452afc74d3ca8 (patch)
treef254d446f7a6f974a724271870f554fdc9b83497
parent1e19e25cd10c24f25beddff56b7c4b5fdc5adbcb (diff)
downloadpdfium-780a6339d5beee5cd7b138ad947452afc74d3ca8.tar.xz
Fixing the prefix on IsTooBig
Change-Id: I3be788e06790d8102fc3793a50a58c19f05f855d Reviewed-on: https://pdfium-review.googlesource.com/16790 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmexpression.cpp50
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp40
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h2
3 files changed, 46 insertions, 46 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
index e8ab35ea67..661ce42789 100644
--- a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
@@ -98,7 +98,7 @@ bool CXFA_FMFunctionDefinition::ToJavaScript(CFX_WideTextBuf& javascript) {
ret = expr->ToImpliedReturnJS(javascript);
else
ret = expr->ToJavaScript(javascript);
- if (!ret || CFXA_IsTooBig(javascript))
+ if (!ret || CXFA_IsTooBig(javascript))
return false;
}
javascript << L"return ";
@@ -257,7 +257,7 @@ bool CXFA_FMBlockExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << L"{\n";
for (const auto& expr : m_ExpressionList) {
- if (!expr->ToJavaScript(javascript) || CFXA_IsTooBig(javascript))
+ if (!expr->ToJavaScript(javascript) || CXFA_IsTooBig(javascript))
return false;
}
javascript << L"}\n";
@@ -276,7 +276,7 @@ bool CXFA_FMBlockExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
ret = expr->ToImpliedReturnJS(javascript);
else
ret = expr->ToJavaScript(javascript);
- if (!ret || CFXA_IsTooBig(javascript))
+ if (!ret || CXFA_IsTooBig(javascript))
return false;
}
javascript << L"}\n";
@@ -332,13 +332,13 @@ bool CXFA_FMIfExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << L")";
}
javascript << L")\n";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
if (m_pIfExpression) {
if (!m_pIfExpression->ToJavaScript(javascript))
return false;
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
}
@@ -355,7 +355,7 @@ bool CXFA_FMIfExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
return false;
}
}
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
bool CXFA_FMIfExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
@@ -374,13 +374,13 @@ bool CXFA_FMIfExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << L")";
}
javascript << L")\n";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
if (m_pIfExpression) {
if (!m_pIfExpression->ToImpliedReturnJS(javascript))
return false;
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
}
if (m_pElseExpression) {
@@ -396,7 +396,7 @@ bool CXFA_FMIfExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
return false;
}
}
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMLoopExpression::~CXFA_FMLoopExpression() {}
@@ -430,12 +430,12 @@ bool CXFA_FMWhileExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pCondition->ToJavaScript(javascript))
return false;
javascript << L")\n";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
if (!m_pExpression->ToJavaScript(javascript))
return false;
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
bool CXFA_FMWhileExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
@@ -449,12 +449,12 @@ bool CXFA_FMWhileExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
if (!m_pCondition->ToJavaScript(javascript))
return false;
javascript << L")\n";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
if (!m_pExpression->ToImpliedReturnJS(javascript))
return false;
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMBreakExpression::CXFA_FMBreakExpression(uint32_t line)
@@ -554,7 +554,7 @@ bool CXFA_FMForExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
return false;
javascript << L"); ";
javascript << tempVariant;
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
javascript << (m_bDirection ? kLessEqual : kGreaterEqual);
@@ -565,7 +565,7 @@ bool CXFA_FMForExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << L"); ";
javascript << tempVariant;
javascript << (m_bDirection ? kPlusEqual : kMinusEqual);
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
if (m_pStep) {
@@ -574,7 +574,7 @@ bool CXFA_FMForExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pStep->ToJavaScript(javascript))
return false;
javascript << L")";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
} else {
javascript << L"1";
@@ -583,7 +583,7 @@ bool CXFA_FMForExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pList->ToJavaScript(javascript))
return false;
javascript << L"}\n";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
bool CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
@@ -613,7 +613,7 @@ bool CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
return false;
javascript << L"); ";
javascript << tempVariant;
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
javascript << (m_bDirection ? kLessEqual : kGreaterEqual);
@@ -625,7 +625,7 @@ bool CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << tempVariant;
javascript << L" += ";
javascript << (m_bDirection ? kPlusEqual : kMinusEqual);
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
if (m_pStep) {
@@ -634,7 +634,7 @@ bool CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
if (!m_pStep->ToJavaScript(javascript))
return false;
javascript << L")";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
} else {
javascript << L"1";
@@ -643,7 +643,7 @@ bool CXFA_FMForExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
if (!m_pList->ToImpliedReturnJS(javascript))
return false;
javascript << L"}\n";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMForeachExpression::CXFA_FMForeachExpression(
@@ -685,7 +685,7 @@ bool CXFA_FMForeachExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
return false;
if (expr != m_pAccessors.back())
javascript << L", ";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
}
javascript << L");\n";
@@ -714,7 +714,7 @@ bool CXFA_FMForeachExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
return false;
javascript << L"}\n";
javascript << L"}\n";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
bool CXFA_FMForeachExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
@@ -745,7 +745,7 @@ bool CXFA_FMForeachExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
return false;
if (expr != m_pAccessors.back())
javascript << L", ";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
}
javascript << L");\n";
@@ -774,5 +774,5 @@ bool CXFA_FMForeachExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
return false;
javascript << L"}\n";
javascript << L"}\n";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
index 86b7c91ec5..19478405e0 100644
--- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
@@ -262,7 +262,7 @@ bool CXFA_FMAssignExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << L"(";
javascript << tempExp1;
javascript << L", ";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
CFX_WideTextBuf tempExp2;
@@ -282,7 +282,7 @@ bool CXFA_FMAssignExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << tempExp2;
javascript << L");\n}\n";
}
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
bool CXFA_FMAssignExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
@@ -304,7 +304,7 @@ bool CXFA_FMAssignExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << L"(";
javascript << tempExp1;
javascript << L", ";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
CFX_WideTextBuf tempExp2;
@@ -326,7 +326,7 @@ bool CXFA_FMAssignExpression::ToImpliedReturnJS(CFX_WideTextBuf& javascript) {
javascript << tempExp2;
javascript << L");\n}\n";
}
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMLogicalOrExpression::CXFA_FMLogicalOrExpression(
@@ -349,7 +349,7 @@ bool CXFA_FMLogicalOrExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pExp2->ToJavaScript(javascript))
return false;
javascript << L")";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMLogicalAndExpression::CXFA_FMLogicalAndExpression(
@@ -372,7 +372,7 @@ bool CXFA_FMLogicalAndExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pExp2->ToJavaScript(javascript))
return false;
javascript << L")";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMEqualityExpression::CXFA_FMEqualityExpression(
@@ -407,7 +407,7 @@ bool CXFA_FMEqualityExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pExp2->ToJavaScript(javascript))
return false;
javascript << L")";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMRelationalExpression::CXFA_FMRelationalExpression(
@@ -450,7 +450,7 @@ bool CXFA_FMRelationalExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pExp2->ToJavaScript(javascript))
return false;
javascript << L")";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMAdditiveExpression::CXFA_FMAdditiveExpression(
@@ -483,7 +483,7 @@ bool CXFA_FMAdditiveExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pExp2->ToJavaScript(javascript))
return false;
javascript << L")";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMMultiplicativeExpression::CXFA_FMMultiplicativeExpression(
@@ -517,7 +517,7 @@ bool CXFA_FMMultiplicativeExpression::ToJavaScript(
if (!m_pExp2->ToJavaScript(javascript))
return false;
javascript << L")";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMPosExpression::CXFA_FMPosExpression(
@@ -649,7 +649,7 @@ bool CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (i + 1 < m_Arguments.size()) {
javascript << L", ";
}
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
}
} else {
@@ -661,7 +661,7 @@ bool CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << L")";
if (expr != m_Arguments.back())
javascript << L", ";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
}
}
@@ -710,7 +710,7 @@ bool CXFA_FMCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
return false;
if (expr != m_Arguments.back())
javascript << L", ";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
}
}
@@ -753,7 +753,7 @@ bool CXFA_FMDotAccessorExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
}
javascript << L", ";
javascript << L"\"";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
if (m_pExp1 && m_pExp1->GetOperatorToken() == TOKidentifier)
@@ -775,7 +775,7 @@ bool CXFA_FMDotAccessorExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
if (!m_pExp2->ToJavaScript(javascript))
return false;
javascript << L")";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMIndexExpression::CXFA_FMIndexExpression(
@@ -848,7 +848,7 @@ bool CXFA_FMDotDotAccessorExpression::ToJavaScript(
javascript << tempExp1;
javascript << L", ";
javascript << L"\"";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
if (m_pExp1->GetOperatorToken() == TOKidentifier)
@@ -860,7 +860,7 @@ bool CXFA_FMDotDotAccessorExpression::ToJavaScript(
if (!m_pExp2->ToJavaScript(javascript))
return false;
javascript << L")";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
CXFA_FMMethodCallExpression::CXFA_FMMethodCallExpression(
@@ -889,7 +889,7 @@ bool CXFA_FMMethodCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << L"for(var index = accessor_object.length - 1; index > 1; "
L"index--)\n{\n";
javascript << L"method_return_value = accessor_object[index].";
- if (CFXA_IsTooBig(javascript))
+ if (CXFA_IsTooBig(javascript))
return false;
CFX_WideTextBuf tempExp2;
@@ -902,9 +902,9 @@ bool CXFA_FMMethodCallExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << L";\n}\n";
javascript << L"return method_return_value;\n";
javascript << L"}\n).call(this)";
- return !CFXA_IsTooBig(javascript);
+ return !CXFA_IsTooBig(javascript);
}
-bool CFXA_IsTooBig(const CFX_WideTextBuf& javascript) {
+bool CXFA_IsTooBig(const CFX_WideTextBuf& javascript) {
return javascript.GetSize() > 256 * 1024 * 1024;
}
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h
index 864c822a12..440b154d3d 100644
--- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h
+++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.h
@@ -303,6 +303,6 @@ class CXFA_FMMethodCallExpression : public CXFA_FMBinExpression {
bool ToJavaScript(CFX_WideTextBuf& javascript) override;
};
-bool CFXA_IsTooBig(const CFX_WideTextBuf& javascript);
+bool CXFA_IsTooBig(const CFX_WideTextBuf& javascript);
#endif // XFA_FXFA_FM2JS_CXFA_FMSIMPLEEXPRESSION_H_