Merge to Master: Fix a compiling error in fxjs_v8.h
[pdfium.git] / fpdfsdk / include / jsapi / fxjs_v8.h
index b6ea60b..70653c5 100644 (file)
@@ -8,6 +8,7 @@
 #define FXJSAPI_H
 
 #include <v8.h>
+#include "../../../core/include/fxcrt/fx_string.h"  // For CFX_WideString
 
 enum FXJSOBJTYPE
 {
@@ -41,8 +42,8 @@ typedef v8::Isolate IJS_Runtime;
 class IFXJS_Context;
 class IFXJS_Runtime;
 
-typedef unsigned (*LP_CONSTRUCTOR)(IFXJS_Context* cc, v8::Handle<v8::Object> obj, v8::Handle<v8::Object> global);
-typedef unsigned (*LP_DESTRUCTOR)(v8::Handle<v8::Object> obj);
+typedef void (*LP_CONSTRUCTOR)(IFXJS_Context* cc, v8::Handle<v8::Object> obj, v8::Handle<v8::Object> global);
+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);
@@ -66,11 +67,10 @@ v8::Handle<v8::Object>                      JS_GetThisObj(IJS_Runtime * pJSRuntime);
 int                                                            JS_GetObjDefnID(v8::Handle<v8::Object> pObj);
 IJS_Runtime*                                   JS_GetRuntime(v8::Handle<v8::Object> pObj);
 int                                                            JS_GetObjDefnID(IJS_Runtime * pJSRuntime, const wchar_t* pObjName);
-void                                                   JS_Error(v8::Value * pError,const wchar_t * main,const wchar_t * sub);
+void                                                   JS_Error(v8::Isolate* isolate, const CFX_WideString& message);
 unsigned                                               JS_CalcHash(const wchar_t* main, unsigned nLen);
 unsigned                                               JS_CalcHash(const wchar_t* main);
 const wchar_t*                                 JS_GetTypeof(v8::Handle<v8::Value> pObj);
-const wchar_t*                                 JS_GetClassname(v8::Handle<v8::Object> pObj);
 void                                                   JS_SetPrivate(IJS_Runtime* pJSRuntime, v8::Handle<v8::Object> pObj, void* p);
 void*                                                  JS_GetPrivate(IJS_Runtime* pJSRuntime, v8::Handle<v8::Object> pObj);
 void                                                   JS_SetPrivate(v8::Handle<v8::Object> pObj, void* p);