summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/JS_Define.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-02 15:35:26 -0800
committerTom Sepez <tsepez@chromium.org>2015-03-02 15:35:26 -0800
commit2f3dfefd2b34fc560c725c255495cc82a2b4044f (patch)
treef808beb51dded7618b0706e87e6290b87cd21a73 /fpdfsdk/include/javascript/JS_Define.h
parent3a83266acee37e99832adaf1337c6b3ab7559f50 (diff)
downloadpdfium-2f3dfefd2b34fc560c725c255495cc82a2b4044f.tar.xz
Merge to XFA: Kill off JS_ErrorString type.
Orignal Review URL: https://codereview.chromium.org/971033002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/969203002
Diffstat (limited to 'fpdfsdk/include/javascript/JS_Define.h')
-rw-r--r--fpdfsdk/include/javascript/JS_Define.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h
index 7b98ee6dd2..2213ff9e39 100644
--- a/fpdfsdk/include/javascript/JS_Define.h
+++ b/fpdfsdk/include/javascript/JS_Define.h
@@ -13,7 +13,6 @@
typedef v8::Value JSValue;
typedef v8::Handle<v8::Object> JSObject;
typedef v8::Handle<v8::Object> JSFXObject;
-typedef unsigned JSBool;
#include "JS_Object.h"
#include "JS_Value.h"
@@ -40,13 +39,6 @@ struct JSMethodSpec
unsigned nParamNum;
};
-#define JS_TRUE (unsigned)1
-#define JS_FALSE (unsigned)0
-
-typedef CFX_WideString JS_ErrorString;
-typedef CFX_ArrayTemplate<float> CJS_PointsArray;
-typedef CFX_ArrayTemplate<int> CJS_IntArray;
-
/* ====================================== PUBLIC DEFINE SPEC ============================================== */
#define JS_WIDESTRING(widestring) L###widestring
@@ -160,8 +152,8 @@ void JSMethod(const char* method_name_string,
/* ===================================== JS CLASS =============================================== */
#define DECLARE_JS_CLASS(js_class_name) \
- static JSBool JSConstructor(IFXJS_Context* cc, JSFXObject obj,JSFXObject global);\
- static JSBool JSDestructor(JSFXObject obj);\
+ static void JSConstructor(IFXJS_Context* cc, JSFXObject obj,JSFXObject global);\
+ static void JSDestructor(JSFXObject obj);\
static int Init(IJS_Runtime* pRuntime, FXJSOBJTYPE eObjType);\
static JSConstSpec JS_Class_Consts[];\
static JSPropertySpec JS_Class_Properties[];\
@@ -170,22 +162,20 @@ void JSMethod(const char* method_name_string,
#define IMPLEMENT_JS_CLASS_RICH(js_class_name, class_alternate, class_name) \
const wchar_t* js_class_name::m_pClassName = JS_WIDESTRING(class_name);\
-JSBool js_class_name::JSConstructor(IFXJS_Context* cc, JSFXObject obj, JSFXObject global)\
+void js_class_name::JSConstructor(IFXJS_Context* cc, JSFXObject obj, JSFXObject global)\
{\
CJS_Object* pObj = FX_NEW js_class_name(obj);\
pObj->SetEmbedObject(FX_NEW class_alternate(pObj));\
JS_SetPrivate(NULL,obj,(void*)pObj); \
pObj->InitInstance(cc);\
- return JS_TRUE;\
}\
\
-JSBool js_class_name::JSDestructor(JSFXObject obj) \
+void js_class_name::JSDestructor(JSFXObject obj) \
{\
js_class_name* pObj = (js_class_name*)JS_GetPrivate(NULL,obj);\
ASSERT(pObj != NULL);\
pObj->ExitInstance();\
delete pObj;\
- return JS_TRUE;\
}\
\
int js_class_name::Init(IJS_Runtime* pRuntime, FXJSOBJTYPE eObjType)\
@@ -315,8 +305,8 @@ void JSSpecialPropDel(const char* class_name,
}
#define DECLARE_SPECIAL_JS_CLASS(js_class_name) \
- static JSBool JSConstructor(IFXJS_Context* cc, JSFXObject obj, JSFXObject global);\
- static JSBool JSDestructor(JSFXObject obj);\
+ static void JSConstructor(IFXJS_Context* cc, JSFXObject obj, JSFXObject global);\
+ static void JSDestructor(JSFXObject obj);\
static JSConstSpec JS_Class_Consts[];\
static JSPropertySpec JS_Class_Properties[];\
static JSMethodSpec JS_Class_Methods[];\
@@ -341,22 +331,20 @@ void js_class_name::putprop_##js_class_name##_static(v8::Local<v8::String> prope
void js_class_name::delprop_##js_class_name##_static(v8::Local<v8::String> property,const v8::PropertyCallbackInfo<v8::Boolean>& info) { \
JSSpecialPropDel<class_alternate>(#class_name, property, info); \
} \
-JSBool js_class_name::JSConstructor(IFXJS_Context* cc, JSFXObject obj,JSFXObject global)\
+void js_class_name::JSConstructor(IFXJS_Context* cc, JSFXObject obj,JSFXObject global)\
{\
CJS_Object* pObj = FX_NEW js_class_name(obj);\
pObj->SetEmbedObject(FX_NEW class_alternate(pObj));\
JS_SetPrivate(NULL,obj, (void*)pObj); \
pObj->InitInstance(cc);\
- return JS_TRUE;\
}\
\
-JSBool js_class_name::JSDestructor(JSFXObject obj) \
+void js_class_name::JSDestructor(JSFXObject obj) \
{\
js_class_name* pObj = (js_class_name*)JS_GetPrivate(NULL,obj);\
ASSERT(pObj != NULL);\
pObj->ExitInstance();\
delete pObj;\
- return JS_TRUE;\
}\
\
int js_class_name::Init(IJS_Runtime* pRuntime, FXJSOBJTYPE eObjType)\