diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-23 17:50:57 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-23 17:50:57 -0700 |
commit | ef25d9995e494bd596ffea8fb8c09c2e48daa9a0 (patch) | |
tree | 53e22c58375eb36abe97f5b8f2631b4eba111fbc /fpdfsdk/src/javascript/PublicMethods.cpp | |
parent | e4fde52cc2c827e637c96e8e1f76ba4644cf718a (diff) | |
download | pdfium-ef25d9995e494bd596ffea8fb8c09c2e48daa9a0.tar.xz |
Remove unused nParamNum values from JS method tables.
The code to validate the number of parameters happens inside each particular
method, rather than prior to method dispatch. As such, there's no point in
having this number take up space in the table.
Add some test to cover at least some of the per-method validations, and
update error messages to be more useful.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1084183008
Diffstat (limited to 'fpdfsdk/src/javascript/PublicMethods.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/PublicMethods.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp index ff5b9a787a..6a9839ebf5 100644 --- a/fpdfsdk/src/javascript/PublicMethods.cpp +++ b/fpdfsdk/src/javascript/PublicMethods.cpp @@ -36,28 +36,28 @@ static v8::Isolate* GetIsolate(IFXJS_Context* cc) #define DOUBLE_CORRECT 0.000000000000001 BEGIN_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) - JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Format,6) - JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Keystroke,6) - JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Format,2) - JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Keystroke,2) - JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_FormatEx,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_KeystrokeEx,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_Format,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_Keystroke,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_FormatEx,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_KeystrokeEx,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_Format,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_Keystroke,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_Format,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_Keystroke,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_KeystrokeEx,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFSimple,3) - JS_STATIC_GLOBAL_FUN_ENTRY(AFMakeNumber,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFSimple_Calculate,2) - JS_STATIC_GLOBAL_FUN_ENTRY(AFRange_Validate,4) - JS_STATIC_GLOBAL_FUN_ENTRY(AFMergeChange,1) - JS_STATIC_GLOBAL_FUN_ENTRY(AFParseDateEx,2) - JS_STATIC_GLOBAL_FUN_ENTRY(AFExtractNums,1) + JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Format) + JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Keystroke) + JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Format) + JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Keystroke) + JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_FormatEx) + JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_KeystrokeEx) + JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_Format) + JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_Keystroke) + JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_FormatEx) + JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_KeystrokeEx) + JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_Format) + JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_Keystroke) + JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_Format) + JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_Keystroke) + JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_KeystrokeEx) + JS_STATIC_GLOBAL_FUN_ENTRY(AFSimple) + JS_STATIC_GLOBAL_FUN_ENTRY(AFMakeNumber) + JS_STATIC_GLOBAL_FUN_ENTRY(AFSimple_Calculate) + JS_STATIC_GLOBAL_FUN_ENTRY(AFRange_Validate) + JS_STATIC_GLOBAL_FUN_ENTRY(AFMergeChange) + JS_STATIC_GLOBAL_FUN_ENTRY(AFParseDateEx) + JS_STATIC_GLOBAL_FUN_ENTRY(AFExtractNums) END_JS_STATIC_GLOBAL_FUN() IMPLEMENT_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) |