diff options
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r-- | fpdfsdk/include/javascript/JS_Define.h | 22 | ||||
-rw-r--r-- | fpdfsdk/include/jsapi/fxjs_v8.h | 9 |
2 files changed, 15 insertions, 16 deletions
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h index c86289e640..81d44550c4 100644 --- a/fpdfsdk/include/javascript/JS_Define.h +++ b/fpdfsdk/include/javascript/JS_Define.h @@ -23,14 +23,14 @@ struct JSConstSpec struct JSPropertySpec
{
const wchar_t* pName;
- AccessorGetterCallback pPropGet;
- AccessorSetterCallback pPropPut;
+ v8::AccessorGetterCallback pPropGet;
+ v8::AccessorSetterCallback pPropPut;
};
struct JSMethodSpec
{
const wchar_t* pName;
- FunctionCallback pMethodCall;
+ v8::FunctionCallback pMethodCall;
unsigned nParamNum;
};
@@ -100,7 +100,7 @@ typedef CFX_WideString JS_ErrorString; v8::Local<v8::Value> v = context->GetEmbedderData(1);\
ASSERT(!v.IsEmpty());\
if(v.IsEmpty()) return;\
- v8::Handle<External> field = v8::Handle<External>::Cast(v);\
+ v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(v);\
IFXJS_Runtime* pRuntime = (IFXJS_Runtime*)field->Value();\
IFXJS_Context* cc = pRuntime->GetCurrentContext();\
CJS_PropValue value(isolate);\
@@ -146,7 +146,7 @@ typedef CFX_WideString JS_ErrorString; v8::Local<v8::Value> v = context->GetEmbedderData(1);\
ASSERT(!v.IsEmpty());\
if(v.IsEmpty()) return;\
- v8::Handle<External> field = v8::Handle<External>::Cast(v);\
+ v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(v);\
IFXJS_Runtime* pRuntime = (IFXJS_Runtime*)field->Value();\
IFXJS_Context* cc = pRuntime->GetCurrentContext();\
CJS_PropValue propValue(CJS_Value(isolate,value,VT_unknown));\
@@ -197,7 +197,7 @@ JS_STATIC_PROP_SET(prop_name, class_name) v8::Local<v8::Value> v = context->GetEmbedderData(1);\
ASSERT(!v.IsEmpty());\
if(v.IsEmpty()) return;\
- v8::Handle<External> field = v8::Handle<External>::Cast(v);\
+ v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(v);\
IFXJS_Runtime* pRuntime = (IFXJS_Runtime*)field->Value();\
IFXJS_Context* cc = pRuntime->GetCurrentContext();\
CJS_Parameters parameters;\
@@ -403,7 +403,7 @@ const wchar_t * js_class_name::m_pClassName = JS_WIDESTRING(class_name);\ v8::Local<v8::Value> v = context->GetEmbedderData(1);\
ASSERT(!v.IsEmpty());\
if(v.IsEmpty()) return;\
- v8::Handle<External> field = v8::Handle<External>::Cast(v);\
+ v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(v);\
IFXJS_Runtime* pRuntime = (IFXJS_Runtime*)field->Value();\
IFXJS_Context* cc = pRuntime->GetCurrentContext();\
v8::String::Utf8Value utf8_value(property);\
@@ -451,7 +451,7 @@ const wchar_t * js_class_name::m_pClassName = JS_WIDESTRING(class_name);\ v8::Local<v8::Value> v = context->GetEmbedderData(1);\
ASSERT(!v.IsEmpty());\
if(v.IsEmpty()) return;\
- v8::Handle<External> field = v8::Handle<External>::Cast(v);\
+ v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(v);\
IFXJS_Runtime* pRuntime = (IFXJS_Runtime*)field->Value();\
IFXJS_Context* cc = pRuntime->GetCurrentContext();\
v8::String::Utf8Value utf8_value(property);\
@@ -498,7 +498,7 @@ const wchar_t * js_class_name::m_pClassName = JS_WIDESTRING(class_name);\ v8::Local<v8::Value> v = context->GetEmbedderData(1);\
ASSERT(!v.IsEmpty());\
if(v.IsEmpty()) return;\
- v8::Handle<External> field = v8::Handle<External>::Cast(v);\
+ v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(v);\
IFXJS_Runtime* pRuntime = (IFXJS_Runtime*)field->Value();\
IFXJS_Context* cc = pRuntime->GetCurrentContext();\
v8::String::Utf8Value utf8_value(property);\
@@ -598,7 +598,7 @@ void js_class_name::GetMethods(JSMethodSpec*& pMethods, int& nSize)\ v8::Local<v8::Value> v = context->GetEmbedderData(1);\
ASSERT(!v.IsEmpty());\
if(v.IsEmpty()) return;\
- v8::Handle<External> field = v8::Handle<External>::Cast(v);\
+ v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(v);\
IFXJS_Runtime* pRuntime = (IFXJS_Runtime*)field->Value();\
IFXJS_Context* cc = pRuntime->GetCurrentContext();\
CJS_Parameters parameters;\
@@ -651,7 +651,7 @@ static void fun_name##_static(JS_METHOD_ARGS)\ v8::Local<v8::Value> v = context->GetEmbedderData(1);\
ASSERT(!v.IsEmpty());\
if(v.IsEmpty()) return;\
- v8::Handle<External> field = v8::Handle<External>::Cast(v);\
+ v8::Handle<v8::External> field = v8::Handle<v8::External>::Cast(v);\
IFXJS_Runtime* pRuntime = (IFXJS_Runtime*)field->Value();\
IFXJS_Context* cc = pRuntime->GetCurrentContext();\
CJS_Parameters parameters;\
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index 7e8e655a6e..3ea5054e17 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -8,7 +8,6 @@ #define FXJSAPI_H #include <v8.h> -using namespace v8; enum FXJSOBJTYPE { @@ -63,11 +62,11 @@ typedef unsigned (*LP_DESTRUCTOR)(JS_DESTRUCTOR_ARGS); #endif 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, FunctionCallback pMethodCall, unsigned nParamNum); -int JS_DefineObjProperty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sPropName, AccessorGetterCallback pPropGet, AccessorSetterCallback pPropPut); -int JS_DefineObjAllProperties(IJS_Runtime* pJSRuntime, int nObjDefnID, NamedPropertyQueryCallback pPropQurey, NamedPropertyGetterCallback pPropGet, NamedPropertySetterCallback pPropPut, NamedPropertyDeleterCallback pPropDel); +int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::FunctionCallback pMethodCall, unsigned nParamNum); +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, FunctionCallback pMethodCall, unsigned nParamNum); +int JS_DefineGlobalMethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v8::FunctionCallback pMethodCall, unsigned nParamNum); 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); |