summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/global.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-11 13:04:48 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-11 13:04:48 -0700
commitf9e40aec10263f9445d69598657f42550294d653 (patch)
treeeb20eaef0841334b14266b4a83efe34ade7b1b0e /fpdfsdk/src/javascript/global.cpp
parentdf4de98c06075b0e491ac645f2d118a6813cedc9 (diff)
downloadpdfium-f9e40aec10263f9445d69598657f42550294d653.tar.xz
Fix strings, remove stringify macros, void return types for Consts.h.
Replace multiple #defines of the same strings with externs. Fix strings mangled by interaction of # and clang-format. Remove macros as possible. Make more JS_ functions void and simplify. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1342433002 .
Diffstat (limited to 'fpdfsdk/src/javascript/global.cpp')
-rw-r--r--fpdfsdk/src/javascript/global.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index e817eca32c..bde4e7d5ae 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -60,21 +60,21 @@ class HashVerify {
HashVerify::HashVerify() {
ASSERT(JSCONST_nStringHash ==
- JS_CalcHash(VALUE_NAME_STRING, wcslen(VALUE_NAME_STRING)));
+ JS_CalcHash(kFXJSValueNameString, wcslen(kFXJSValueNameString)));
ASSERT(JSCONST_nNumberHash ==
- JS_CalcHash(VALUE_NAME_NUMBER, wcslen(VALUE_NAME_NUMBER)));
+ JS_CalcHash(kFXJSValueNameNumber, wcslen(kFXJSValueNameNumber)));
ASSERT(JSCONST_nBoolHash ==
- JS_CalcHash(VALUE_NAME_BOOLEAN, wcslen(VALUE_NAME_BOOLEAN)));
+ JS_CalcHash(kFXJSValueNameBoolean, wcslen(kFXJSValueNameBoolean)));
ASSERT(JSCONST_nDateHash ==
- JS_CalcHash(VALUE_NAME_DATE, wcslen(VALUE_NAME_DATE)));
+ JS_CalcHash(kFXJSValueNameDate, wcslen(kFXJSValueNameDate)));
ASSERT(JSCONST_nObjectHash ==
- JS_CalcHash(VALUE_NAME_OBJECT, wcslen(VALUE_NAME_OBJECT)));
+ JS_CalcHash(kFXJSValueNameObject, wcslen(kFXJSValueNameObject)));
ASSERT(JSCONST_nFXobjHash ==
- JS_CalcHash(VALUE_NAME_FXOBJ, wcslen(VALUE_NAME_FXOBJ)));
+ JS_CalcHash(kFXJSValueNameFxobj, wcslen(kFXJSValueNameFxobj)));
ASSERT(JSCONST_nNullHash ==
- JS_CalcHash(VALUE_NAME_NULL, wcslen(VALUE_NAME_NULL)));
+ JS_CalcHash(kFXJSValueNameNull, wcslen(kFXJSValueNameNull)));
ASSERT(JSCONST_nUndefHash ==
- JS_CalcHash(VALUE_NAME_UNDEFINED, wcslen(VALUE_NAME_UNDEFINED)));
+ JS_CalcHash(kFXJSValueNameUndefined, wcslen(kFXJSValueNameUndefined)));
}
#endif