From d94df885e9e680e7dc8a5ac116c8d4ab5e4790cd Mon Sep 17 00:00:00 2001 From: Jochen Eisinger Date: Sun, 17 May 2015 13:07:02 +0200 Subject: Replace deprecated with non-deprecated V8 APIs In most cases, we just CHECK() that no exception was thrown. Previously, we'd just crash. Ideally, this should all be fixed and the system should cope with those exceptions, but that's beyond this CL. R=tsepez@chromium.org BUG= Review URL: https://codereview.chromium.org/1126203010 --- fpdfsdk/include/jsapi/fxjs_v8.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'fpdfsdk/include/jsapi') diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index 7f23380406..d84b216117 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -86,7 +86,7 @@ void JS_FreePrivate(void* p); void JS_FreePrivate(v8::Handle pObj); v8::Handle JS_GetObjectValue(v8::Handle pObj); v8::Handle JS_GetObjectElement(IJS_Runtime* pJSRuntime, v8::Handle pObj,const wchar_t* PropertyName); -v8::Handle JS_GetObjectElementNames(v8::Handle pObj); +v8::Handle JS_GetObjectElementNames(IJS_Runtime* pJSRuntime, v8::Handle pObj); void JS_PutObjectString(IJS_Runtime* pJSRuntime,v8::Handle pObj, const wchar_t* PropertyName, const wchar_t* sValue); void JS_PutObjectNumber(IJS_Runtime* pJSRuntime,v8::Handle pObj, const wchar_t* PropertyName, int nValue); void JS_PutObjectNumber(IJS_Runtime* pJSRuntime,v8::Handle pObj, const wchar_t* PropertyName, float fValue); @@ -94,10 +94,10 @@ void JS_PutObjectNumber(IJS_Runtime* pJSRuntime,v8::Handle pOb void JS_PutObjectBoolean(IJS_Runtime* pJSRuntime,v8::Handle pObj, const wchar_t* PropertyName, bool bValue); void JS_PutObjectObject(IJS_Runtime* pJSRuntime,v8::Handle pObj, const wchar_t* PropertyName, v8::Handle pPut); void JS_PutObjectNull(IJS_Runtime* pJSRuntime,v8::Handle pObj, const wchar_t* PropertyName); -unsigned JS_PutArrayElement(v8::Handle pArray,unsigned index,v8::Handle pValue,FXJSVALUETYPE eType); -v8::Handle JS_GetArrayElemnet(v8::Handle pArray,unsigned index); +unsigned JS_PutArrayElement(IJS_Runtime* pJSRuntime, v8::Handle pArray,unsigned index,v8::Handle pValue,FXJSVALUETYPE eType); +v8::Handle JS_GetArrayElement(IJS_Runtime* pJSRuntime, v8::Handle pArray,unsigned index); unsigned JS_GetArrayLength(v8::Handle pArray); -v8::Handle JS_GetListValue(v8::Handle pList, int index); +v8::Handle JS_GetListValue(IJS_Runtime* pJSRuntime, v8::Handle pList, int index); v8::Handle JS_NewArray(IJS_Runtime* pJSRuntime); @@ -114,12 +114,12 @@ v8::Handle JS_NewDate(IJS_Runtime* pJSRuntime,double d); v8::Handle JS_NewValue(IJS_Runtime* pJSRuntime); -int JS_ToInt32(v8::Handle pValue); -bool JS_ToBoolean(v8::Handle pValue); -double JS_ToNumber(v8::Handle pValue); -v8::Handle JS_ToObject(v8::Handle pValue); -CFX_WideString JS_ToString(v8::Handle pValue); -v8::Handle JS_ToArray(v8::Handle pValue); +int JS_ToInt32(IJS_Runtime* pJSRuntime, v8::Handle pValue); +bool JS_ToBoolean(IJS_Runtime* pJSRuntime, v8::Handle pValue); +double JS_ToNumber(IJS_Runtime* pJSRuntime, v8::Handle pValue); +v8::Handle JS_ToObject(IJS_Runtime* pJSRuntime, v8::Handle pValue); +CFX_WideString JS_ToString(IJS_Runtime* pJSRuntime, v8::Handle pValue); +v8::Handle JS_ToArray(IJS_Runtime* pJSRuntime, v8::Handle pValue); void JS_ValueCopy(v8::Handle& pTo, v8::Handle pFrom); double JS_GetDateTime(); -- cgit v1.2.3