summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-21 14:51:57 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-21 19:16:29 +0000
commitb89669975f6156fce4ced5c8998125a845f8e7dc (patch)
tree185c2badc52530ec1baddb854824bc5891e476a1 /xfa/fxfa
parentdb0312e6acd7cc15fef0f64e05bd463cb74c70e4 (diff)
downloadpdfium-b89669975f6156fce4ced5c8998125a845f8e7dc.tar.xz
Move CFX_AutoRestorer to fxcrt::AutoRestorer
This CL renames CFX_AutoRestorer to just AutoRestorer and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: Id9f36df94e95f3b2a55054bc198ca1bfd249ee3d Reviewed-on: https://pdfium-review.googlesource.com/14450 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmparser.cpp48
-rw-r--r--xfa/fxfa/parser/cxfa_scriptcontext.cpp8
2 files changed, 28 insertions, 28 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmparser.cpp b/xfa/fxfa/fm2js/cxfa_fmparser.cpp
index dde994318c..644fdf2a82 100644
--- a/xfa/fxfa/fm2js/cxfa_fmparser.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmparser.cpp
@@ -10,7 +10,7 @@
#include <utility>
#include <vector>
-#include "core/fxcrt/cfx_autorestorer.h"
+#include "core/fxcrt/autorestorer.h"
#include "third_party/base/ptr_util.h"
namespace {
@@ -64,7 +64,7 @@ bool CXFA_FMParser::IncrementParseDepthAndCheck() {
std::vector<std::unique_ptr<CXFA_FMExpression>>
CXFA_FMParser::ParseTopExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return std::vector<std::unique_ptr<CXFA_FMExpression>>();
@@ -88,7 +88,7 @@ CXFA_FMParser::ParseTopExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseFunction() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -151,7 +151,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseFunction() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -204,7 +204,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseVarExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -261,7 +261,7 @@ CXFA_FMParser::ParseSimpleExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseExpExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -274,7 +274,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseExpExpression() {
std::unique_ptr<CXFA_FMSimpleExpression>
CXFA_FMParser::ParseLogicalOrExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -309,7 +309,7 @@ CXFA_FMParser::ParseLogicalOrExpression() {
std::unique_ptr<CXFA_FMSimpleExpression>
CXFA_FMParser::ParseLogicalAndExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -343,7 +343,7 @@ CXFA_FMParser::ParseLogicalAndExpression() {
std::unique_ptr<CXFA_FMSimpleExpression>
CXFA_FMParser::ParseEqualityExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -388,7 +388,7 @@ CXFA_FMParser::ParseEqualityExpression() {
std::unique_ptr<CXFA_FMSimpleExpression>
CXFA_FMParser::ParseRelationalExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -458,7 +458,7 @@ CXFA_FMParser::ParseRelationalExpression() {
std::unique_ptr<CXFA_FMSimpleExpression>
CXFA_FMParser::ParseAddtiveExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -502,7 +502,7 @@ CXFA_FMParser::ParseAddtiveExpression() {
std::unique_ptr<CXFA_FMSimpleExpression>
CXFA_FMParser::ParseMultiplicativeExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -545,7 +545,7 @@ CXFA_FMParser::ParseMultiplicativeExpression() {
}
std::unique_ptr<CXFA_FMSimpleExpression> CXFA_FMParser::ParseUnaryExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -593,7 +593,7 @@ std::unique_ptr<CXFA_FMSimpleExpression> CXFA_FMParser::ParseUnaryExpression() {
std::unique_ptr<CXFA_FMSimpleExpression>
CXFA_FMParser::ParsePrimaryExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -661,7 +661,7 @@ CXFA_FMParser::ParsePrimaryExpression() {
std::unique_ptr<CXFA_FMSimpleExpression> CXFA_FMParser::ParsePostExpression(
std::unique_ptr<CXFA_FMSimpleExpression> expr) {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -855,7 +855,7 @@ std::unique_ptr<CXFA_FMSimpleExpression> CXFA_FMParser::ParsePostExpression(
}
std::unique_ptr<CXFA_FMSimpleExpression> CXFA_FMParser::ParseIndexExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -898,7 +898,7 @@ std::unique_ptr<CXFA_FMSimpleExpression> CXFA_FMParser::ParseIndexExpression() {
}
std::unique_ptr<CXFA_FMSimpleExpression> CXFA_FMParser::ParseParenExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -937,7 +937,7 @@ std::unique_ptr<CXFA_FMSimpleExpression> CXFA_FMParser::ParseParenExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseBlockExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -981,7 +981,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseBlockExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseIfExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -1052,7 +1052,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseIfExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseWhileExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -1073,7 +1073,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseWhileExpression() {
std::unique_ptr<CXFA_FMSimpleExpression>
CXFA_FMParser::ParseSubassignmentInForExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -1091,7 +1091,7 @@ CXFA_FMParser::ParseSubassignmentInForExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseForExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -1160,7 +1160,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseForExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseForeachExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
@@ -1209,7 +1209,7 @@ std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseForeachExpression() {
}
std::unique_ptr<CXFA_FMExpression> CXFA_FMParser::ParseDoExpression() {
- CFX_AutoRestorer<unsigned long> restorer(&m_parse_depth);
+ AutoRestorer<unsigned long> restorer(&m_parse_depth);
if (HasError() || !IncrementParseDepthAndCheck())
return nullptr;
diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.cpp b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
index 38d503962d..4e78f46f17 100644
--- a/xfa/fxfa/parser/cxfa_scriptcontext.cpp
+++ b/xfa/fxfa/parser/cxfa_scriptcontext.cpp
@@ -8,7 +8,7 @@
#include <utility>
-#include "core/fxcrt/cfx_autorestorer.h"
+#include "core/fxcrt/autorestorer.h"
#include "core/fxcrt/cfx_widetextbuf.h"
#include "core/fxcrt/fx_extension.h"
#include "fxjs/cfxjse_arguments.h"
@@ -150,7 +150,7 @@ bool CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
CFXJSE_Value* hRetValue,
CXFA_Object* pThisObject) {
ByteString btScript;
- CFX_AutoRestorer<XFA_SCRIPTLANGTYPE> typeRestorer(&m_eScriptType);
+ AutoRestorer<XFA_SCRIPTLANGTYPE> typeRestorer(&m_eScriptType);
m_eScriptType = eScriptType;
if (eScriptType == XFA_SCRIPTLANGTYPE_Formcalc) {
if (!m_FM2JSContext) {
@@ -166,7 +166,7 @@ bool CXFA_ScriptContext::RunScript(XFA_SCRIPTLANGTYPE eScriptType,
} else {
btScript = FX_UTF8Encode(wsScript);
}
- CFX_AutoRestorer<CXFA_Object*> nodeRestorer(&m_pThisObject);
+ AutoRestorer<CXFA_Object*> nodeRestorer(&m_pThisObject);
m_pThisObject = pThisObject;
CFXJSE_Value* pValue = pThisObject ? GetJSValueFromMap(pThisObject) : nullptr;
return m_JsContext->ExecuteScript(btScript.c_str(), hRetValue, pValue);
@@ -498,7 +498,7 @@ bool CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) {
CXFA_Node* pThisObject = pParent->GetNodeItem(XFA_NODEITEM_Parent);
CFXJSE_Context* pVariablesContext =
CreateVariablesContext(pScriptNode, pThisObject);
- CFX_AutoRestorer<CXFA_Object*> nodeRestorer(&m_pThisObject);
+ AutoRestorer<CXFA_Object*> nodeRestorer(&m_pThisObject);
m_pThisObject = pThisObject;
return pVariablesContext->ExecuteScript(btScript.c_str(), hRetValue.get());
}