summaryrefslogtreecommitdiff
path: root/fxjs/cjs_event_context.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-30 21:19:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-10-30 21:19:42 +0000
commitd6e9cfaab0555c34783dd05261329866b4da1b9f (patch)
treef123e3ee82017c1e14a07306f54381ea9bf2966c /fxjs/cjs_event_context.cpp
parentcaee9596e926a41a23fa0ddebd10d509db4b23ab (diff)
downloadpdfium-d6e9cfaab0555c34783dd05261329866b4da1b9f.tar.xz
Convert JS resource into enum classchromium/3254
This CL converts the #defines into an enum class. Change-Id: I895e29e1d46a7a82d7be896f5776eb00d28559f5 Reviewed-on: https://pdfium-review.googlesource.com/17091 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_event_context.cpp')
-rw-r--r--fxjs/cjs_event_context.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fxjs/cjs_event_context.cpp b/fxjs/cjs_event_context.cpp
index bc908a5db2..d2f270b1c4 100644
--- a/fxjs/cjs_event_context.cpp
+++ b/fxjs/cjs_event_context.cpp
@@ -32,7 +32,7 @@ bool CJS_EventContext::RunScript(const WideString& script, WideString* info) {
v8::Context::Scope context_scope(context);
if (m_bBusy) {
- *info = JSGetStringFromID(IDS_STRING_JSBUSY);
+ *info = JSGetStringFromID(JSMessage::kBusyError);
return false;
}
@@ -43,7 +43,7 @@ bool CJS_EventContext::RunScript(const WideString& script, WideString* info) {
CJS_Runtime::FieldEvent event(m_pEventHandler->TargetName(),
m_pEventHandler->EventType());
if (!m_pRuntime->AddEventToSet(event)) {
- *info = JSGetStringFromID(IDS_STRING_JSEVENT);
+ *info = JSGetStringFromID(JSMessage::kDuplicateEventError);
return false;
}
@@ -55,7 +55,7 @@ bool CJS_EventContext::RunScript(const WideString& script, WideString* info) {
if (nRet < 0)
*info += sErrorMessage;
else
- *info = JSGetStringFromID(IDS_STRING_RUN);
+ *info = JSGetStringFromID(JSMessage::kRunSuccess);
m_pRuntime->RemoveEventFromSet(event);
m_pEventHandler->Destroy();