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

Unified Diff: fpdfsdk/javascript/global.cpp

Issue 2319543003: Remove unused context parameter from JSGetStringFromID (Closed)
Patch Set: rebase Created 4 years, 3 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 | « fpdfsdk/javascript/cjs_context.cpp ('k') | fpdfsdk/javascript/resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/global.cpp
diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp
index 27c156e5276871cbd7478a6fa5ccb12b74e0c0dd..c0330f3a14cae2867db34753904a3200c916d71d 100644
--- a/fpdfsdk/javascript/global.cpp
+++ b/fpdfsdk/javascript/global.cpp
@@ -161,13 +161,12 @@ FX_BOOL JSGlobalAlternate::setPersistent(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
CFX_WideString& sError) {
- CJS_Context* pContext = static_cast<CJS_Context*>(cc);
- CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
if (params.size() != 2) {
- sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR);
+ sError = JSGetStringFromID(IDS_STRING_JSPARAMERROR);
return FALSE;
}
+ CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
auto it = m_mapGlobal.find(params[0].ToCFXByteString(pRuntime));
if (it != m_mapGlobal.end()) {
JSGlobalData* pData = it->second;
@@ -177,7 +176,7 @@ FX_BOOL JSGlobalAlternate::setPersistent(IJS_Context* cc,
}
}
- sError = JSGetStringFromID(pContext, IDS_STRING_JSNOGLOBAL);
+ sError = JSGetStringFromID(IDS_STRING_JSNOGLOBAL);
return FALSE;
}
« no previous file with comments | « fpdfsdk/javascript/cjs_context.cpp ('k') | fpdfsdk/javascript/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698