diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-18 14:23:18 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-18 18:40:16 +0000 |
commit | 275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch) | |
tree | 2029b9158ec044764ceff122fe5fb5d0a3f123d1 /fpdfsdk/javascript/cjs_runtime.cpp | |
parent | 450fbeaaabf1ab340c1018de2e58f1950657517e (diff) | |
download | pdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz |
Convert string class names
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/cjs_runtime.cpp')
-rw-r--r-- | fpdfsdk/javascript/cjs_runtime.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fpdfsdk/javascript/cjs_runtime.cpp b/fpdfsdk/javascript/cjs_runtime.cpp index 515bdcb65f..720a15b4bd 100644 --- a/fpdfsdk/javascript/cjs_runtime.cpp +++ b/fpdfsdk/javascript/cjs_runtime.cpp @@ -193,8 +193,7 @@ CPDFSDK_FormFillEnvironment* CJS_Runtime::GetFormFillEnv() const { return m_pFormFillEnv.Get(); } -int CJS_Runtime::ExecuteScript(const CFX_WideString& script, - CFX_WideString* info) { +int CJS_Runtime::ExecuteScript(const WideString& script, WideString* info) { FXJSErr error = {}; int nRet = Execute(script, &error); if (nRet < 0) { @@ -213,13 +212,13 @@ void CJS_Runtime::RemoveEventFromSet(const FieldEvent& event) { } #ifdef PDF_ENABLE_XFA -CFX_WideString ChangeObjName(const CFX_WideString& str) { - CFX_WideString sRet = str; +WideString ChangeObjName(const WideString& str) { + WideString sRet = str; sRet.Replace(L"_", L"."); return sRet; } -bool CJS_Runtime::GetValueByName(const CFX_ByteStringC& utf8Name, +bool CJS_Runtime::GetValueByName(const ByteStringView& utf8Name, CFXJSE_Value* pValue) { v8::Isolate::Scope isolate_scope(GetIsolate()); v8::HandleScope handle_scope(GetIsolate()); @@ -236,7 +235,7 @@ bool CJS_Runtime::GetValueByName(const CFX_ByteStringC& utf8Name, return true; } -bool CJS_Runtime::SetValueByName(const CFX_ByteStringC& utf8Name, +bool CJS_Runtime::SetValueByName(const ByteStringView& utf8Name, CFXJSE_Value* pValue) { if (utf8Name.IsEmpty() || !pValue) return false; |