diff options
author | tsepez <tsepez@chromium.org> | 2016-09-08 11:23:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-08 11:23:24 -0700 |
commit | cd5dc855df0ca37b7667b5f3ceb951d2d417d99f (patch) | |
tree | 3b7b7a8ab8a1738fd11a94df733ceff0cfae299f /fpdfsdk/javascript/resource.cpp | |
parent | 8832fbf53cf71d4d4cb53986d9cfc024edd2bf1f (diff) | |
download | pdfium-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/resource.cpp')
-rw-r--r-- | fpdfsdk/javascript/resource.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/resource.cpp b/fpdfsdk/javascript/resource.cpp index 88721efd2c..c4edeae905 100644 --- a/fpdfsdk/javascript/resource.cpp +++ b/fpdfsdk/javascript/resource.cpp @@ -6,7 +6,7 @@ #include "fpdfsdk/javascript/resource.h" -CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id) { +CFX_WideString JSGetStringFromID(FX_UINT id) { switch (id) { case IDS_STRING_JSALERT: return L"Alert"; @@ -25,7 +25,7 @@ CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id) { return L"The input value must be greater than or equal to %s."; case IDS_STRING_JSRANGE3: return L"The input value must be less than or equal to %s."; - case IDS_STRING_NOTSUPPORT: + case IDS_STRING_JSNOTSUPPORT: return L"Operation not supported."; case IDS_STRING_JSBUSY: return L"System is busy."; @@ -45,6 +45,10 @@ CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id) { return L"Incorrect parameter type."; case IDS_STRING_JSVALUEERROR: return L"Incorrect parameter value."; + case IDS_STRING_JSNOPERMISSION: + return L"Permission denied."; + case IDS_STRING_JSBADOBJECT: + return L"Object no longer exists."; default: return L""; } |