Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: fpdfsdk/include/javascript/JS_Define.h

Issue 1105813002: Merge to XFA: Remove unused nParamNum values from JS method tables. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/include/javascript/resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/javascript/JS_Define.h
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h
index 0c2574d26da4385e07c36ed7a562f7043a7f1188..e9475a03a29d7038345b0228b977548e564ddf99 100644
--- a/fpdfsdk/include/javascript/JS_Define.h
+++ b/fpdfsdk/include/javascript/JS_Define.h
@@ -32,7 +32,6 @@ struct JSMethodSpec
{
const wchar_t* pName;
v8::FunctionCallback pMethodCall;
- unsigned nParamNum;
};
/* ====================================== PUBLIC DEFINE SPEC ============================================== */
@@ -48,8 +47,8 @@ struct JSMethodSpec
#define END_JS_STATIC_PROP() {0, 0, 0}};
#define BEGIN_JS_STATIC_METHOD(js_class_name) JSMethodSpec js_class_name::JS_Class_Methods[] = {
-#define JS_STATIC_METHOD_ENTRY(method_name, nargs) {JS_WIDESTRING(method_name), method_name##_static, nargs},
-#define END_JS_STATIC_METHOD() {0, 0, 0}};
+#define JS_STATIC_METHOD_ENTRY(method_name) {JS_WIDESTRING(method_name), method_name##_static},
+#define END_JS_STATIC_METHOD() {0, 0}};
/* ======================================== PROP CALLBACK ============================================ */
@@ -185,7 +184,7 @@ int js_class_name::Init(IJS_Runtime* pRuntime, FXJSOBJTYPE eObjType)\
}\
for (int k=0, szk=sizeof(JS_Class_Methods)/sizeof(JSMethodSpec)-1; k<szk; k++)\
{\
- if (JS_DefineObjMethod(pRuntime, nObjDefnID,JS_Class_Methods[k].pName, JS_Class_Methods[k].pMethodCall, JS_Class_Methods[k].nParamNum) < 0) return -1;\
+ if (JS_DefineObjMethod(pRuntime, nObjDefnID,JS_Class_Methods[k].pName, JS_Class_Methods[k].pMethodCall) < 0) return -1;\
}\
return nObjDefnID;\
}\
@@ -357,7 +356,7 @@ int js_class_name::Init(IJS_Runtime* pRuntime, FXJSOBJTYPE eObjType)\
\
for (int k=0, szk=sizeof(JS_Class_Methods)/sizeof(JSMethodSpec)-1; k<szk; k++)\
{\
- if (JS_DefineObjMethod(pRuntime, nObjDefnID,JS_Class_Methods[k].pName,JS_Class_Methods[k].pMethodCall,JS_Class_Methods[k].nParamNum)<0)return -1;\
+ if (JS_DefineObjMethod(pRuntime, nObjDefnID,JS_Class_Methods[k].pName,JS_Class_Methods[k].pMethodCall)<0)return -1;\
}\
if (JS_DefineObjAllProperties(pRuntime, nObjDefnID, js_class_name::queryprop_##js_class_name##_static, js_class_name::getprop_##js_class_name##_static,js_class_name::putprop_##js_class_name##_static,js_class_name::delprop_##js_class_name##_static)<0) return -1;\
\
@@ -400,7 +399,7 @@ static int Init(IJS_Runtime* pRuntime)
#define BEGIN_JS_STATIC_GLOBAL_FUN(js_class_name) \
JSMethodSpec js_class_name::global_methods[] = {
-#define JS_STATIC_GLOBAL_FUN_ENTRY(method_name,nargs) JS_STATIC_METHOD_ENTRY(method_name,nargs)
+#define JS_STATIC_GLOBAL_FUN_ENTRY(method_name) JS_STATIC_METHOD_ENTRY(method_name)
#define END_JS_STATIC_GLOBAL_FUN() END_JS_STATIC_METHOD()
@@ -411,8 +410,7 @@ int js_class_name::Init(IJS_Runtime* pRuntime)\
{\
if (JS_DefineGlobalMethod(pRuntime,\
js_class_name::global_methods[i].pName,\
- js_class_name::global_methods[i].pMethodCall,\
- js_class_name::global_methods[i].nParamNum\
+ js_class_name::global_methods[i].pMethodCall\
) < 0\
)return -1;\
}\
« no previous file with comments | « no previous file | fpdfsdk/include/javascript/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698