summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/cjs_context.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-08 11:23:24 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-08 11:23:24 -0700
commitcd5dc855df0ca37b7667b5f3ceb951d2d417d99f (patch)
tree3b7b7a8ab8a1738fd11a94df733ceff0cfae299f /fpdfsdk/javascript/cjs_context.cpp
parent8832fbf53cf71d4d4cb53986d9cfc024edd2bf1f (diff)
downloadpdfium-cd5dc855df0ca37b7667b5f3ceb951d2d417d99f.tar.xz
Remove unused context parameter from JSGetStringFromID
Clean up before using IDS_STRING_JSBADOBJECT in nearly all JS callbacks, which will happen in the next CL when we watch C-side object destruction. Add a "no permission" message as well. Review-Url: https://codereview.chromium.org/2319543003
Diffstat (limited to 'fpdfsdk/javascript/cjs_context.cpp')
-rw-r--r--fpdfsdk/javascript/cjs_context.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/javascript/cjs_context.cpp b/fpdfsdk/javascript/cjs_context.cpp
index c37fdab738..87b8b43975 100644
--- a/fpdfsdk/javascript/cjs_context.cpp
+++ b/fpdfsdk/javascript/cjs_context.cpp
@@ -33,7 +33,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
v8::Context::Scope context_scope(context);
if (m_bBusy) {
- *info = JSGetStringFromID(this, IDS_STRING_JSBUSY);
+ *info = JSGetStringFromID(IDS_STRING_JSBUSY);
return FALSE;
}
m_bBusy = TRUE;
@@ -42,7 +42,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
CJS_Runtime::FieldEvent event(m_pEventHandler->TargetName(),
m_pEventHandler->EventType());
if (!m_pRuntime->AddEventToSet(event)) {
- *info = JSGetStringFromID(this, IDS_STRING_JSEVENT);
+ *info = JSGetStringFromID(IDS_STRING_JSEVENT);
return FALSE;
}
@@ -55,7 +55,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
if (nRet < 0) {
*info += sErrorMessage;
} else {
- *info = JSGetStringFromID(this, IDS_STRING_RUN);
+ *info = JSGetStringFromID(IDS_STRING_RUN);
}
m_pRuntime->RemoveEventFromSet(event);