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/jsapi | |
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/jsapi')
-rw-r--r-- | fpdfsdk/src/jsapi/fxjs_v8.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp index 5a77713fb4..c55c092d17 100644 --- a/fpdfsdk/src/jsapi/fxjs_v8.cpp +++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp @@ -90,7 +90,7 @@ int JS_DefineObj(IJS_Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE e return pArray->GetSize()-1; } -int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::FunctionCallback pMethodCall, unsigned nParamNum) +int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::FunctionCallback pMethodCall) { v8::Isolate* isolate = (v8::Isolate*)pJSRuntime; v8::Isolate::Scope isolate_scope(isolate); @@ -185,7 +185,7 @@ static v8::Persistent<v8::ObjectTemplate>& _getGlobalObjectTemplate(IJS_Runtime* return gloabalObjectTemplate; } -int JS_DefineGlobalMethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v8::FunctionCallback pMethodCall, unsigned nParamNum) +int JS_DefineGlobalMethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v8::FunctionCallback pMethodCall) { v8::Isolate* isolate = (v8::Isolate*)pJSRuntime; v8::Isolate::Scope isolate_scope(isolate); |