From cd5dc855df0ca37b7667b5f3ceb951d2d417d99f Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 8 Sep 2016 11:23:24 -0700 Subject: 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 --- fpdfsdk/javascript/cjs_context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fpdfsdk/javascript/cjs_context.cpp') 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); -- cgit v1.2.3