summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/global.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-23 09:40:59 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-23 17:56:28 +0000
commitc970895f94cf76eb738d0a583ae139fecdd85268 (patch)
tree85a46f604e7294cf4402aff67d3338fe031611f4 /fpdfsdk/javascript/global.cpp
parent97dab80731a15a6bd74cdc3caf11f97c3a3be5ed (diff)
downloadpdfium-c970895f94cf76eb738d0a583ae139fecdd85268.tar.xz
Cleanup CJS_Valuechromium/3248
This CL removes unused methods; renames Attach to Set and generally cleans up the CJS_Value classes. Change-Id: I858082100908f3bc51f4b58c11ceda3357fadc70 Reviewed-on: https://pdfium-review.googlesource.com/16430 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/global.cpp')
-rw-r--r--fpdfsdk/javascript/global.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp
index 43c461c497..4635f1c84c 100644
--- a/fpdfsdk/javascript/global.cpp
+++ b/fpdfsdk/javascript/global.cpp
@@ -154,7 +154,7 @@ bool JSGlobalAlternate::setPersistent(CJS_Runtime* pRuntime,
sError = JSGetStringFromID(IDS_STRING_JSPARAMERROR);
return false;
}
- auto it = m_MapGlobal.find(params[0].ToCFXByteString(pRuntime));
+ auto it = m_MapGlobal.find(params[0].ToByteString(pRuntime));
if (it == m_MapGlobal.end() || it->second->bDeleted) {
sError = JSGetStringFromID(IDS_STRING_JSNOGLOBAL);
return false;
@@ -278,7 +278,7 @@ void JSGlobalAlternate::ObjectToArray(CJS_Runtime* pRuntime,
array.Add(pObjElement);
} break;
case CJS_Value::VT_string: {
- ByteString sValue = CJS_Value(pRuntime, v).ToCFXByteString(pRuntime);
+ ByteString sValue = CJS_Value(pRuntime, v).ToByteString(pRuntime);
CJS_KeyValue* pObjElement = new CJS_KeyValue;
pObjElement->nType = JS_GlobalDataType::STRING;
pObjElement->sKey = sKey;