diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-23 18:14:26 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-23 18:14:26 -0700 |
commit | e5350eff5c5cfe4d01686a4c787d764bde5dd23c (patch) | |
tree | 6b62282c48fd5b15a9fbdfd6dacb322bcc9ce0bf /fpdfsdk/include | |
parent | f4ef3f92eb89a460a0715df758122ba662aadc39 (diff) | |
download | pdfium-e5350eff5c5cfe4d01686a4c787d764bde5dd23c.tar.xz |
Merge to XFA: Remove unused nParamNum values from JS method tables.
Original Review URL: https://codereview.chromium.org/1084183008
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1105813002
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r-- | fpdfsdk/include/javascript/JS_Define.h | 14 | ||||
-rw-r--r-- | fpdfsdk/include/javascript/resource.h | 2 | ||||
-rw-r--r-- | fpdfsdk/include/jsapi/fxjs_v8.h | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h index 0c2574d26d..e9475a03a2 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;\ }\ diff --git a/fpdfsdk/include/javascript/resource.h b/fpdfsdk/include/javascript/resource.h index 8f0a25061e..88011f2bb0 100644 --- a/fpdfsdk/include/javascript/resource.h +++ b/fpdfsdk/include/javascript/resource.h @@ -28,6 +28,8 @@ class CJS_Context; #define IDS_STRING_JSPRINT2 25633 #define IDS_STRING_JSNOGLOBAL 25635 #define IDS_STRING_JSREADONLY 25636 +#define IDS_STRING_JSTYPEERROR 25637 +#define IDS_STRING_JSVALUEERROR 25638 CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id); CFX_WideString JSFormatErrorString(const char* class_name, diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index 739fd2d4c0..a32ace674b 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -54,11 +54,11 @@ typedef void (*LP_DESTRUCTOR)(v8::Handle<v8::Object> obj); int JS_DefineObj(IJS_Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUCTOR pConstructor, LP_DESTRUCTOR pDestructor, unsigned bApplyNew); -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); int JS_DefineObjProperty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sPropName, v8::AccessorGetterCallback pPropGet, v8::AccessorSetterCallback pPropPut); int JS_DefineObjAllProperties(IJS_Runtime* pJSRuntime, int nObjDefnID, v8::NamedPropertyQueryCallback pPropQurey, v8::NamedPropertyGetterCallback pPropGet, v8::NamedPropertySetterCallback pPropPut, v8::NamedPropertyDeleterCallback pPropDel); int JS_DefineObjConst(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sConstName, v8::Handle<v8::Value> pDefault); -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); int JS_DefineGlobalConst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8::Handle<v8::Value> pDefault); void JS_InitialRuntime(IJS_Runtime* pJSRuntime,IFXJS_Runtime* pFXRuntime, IFXJS_Context* context, v8::Persistent<v8::Context>& v8PersistentContext); |