From 2fbfb84aedccefbd1c1a7bb2c5b2a723b3f3dd77 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 22 Mar 2017 13:58:45 -0400 Subject: Convert to use info.Holder instead of info.This The definition of info.This is changing in v8. We want to work with the Holder and not what info.This will be returning in the future. Change-Id: Ic988f62d225569398cfde84ab51c72ae620a991a Reviewed-on: https://pdfium-review.googlesource.com/3147 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fxjs/cfxjse_class.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fxjs/cfxjse_class.cpp b/fxjs/cfxjse_class.cpp index fd97b575ed..3801fb520a 100644 --- a/fxjs/cfxjse_class.cpp +++ b/fxjs/cfxjse_class.cpp @@ -24,7 +24,7 @@ void V8FunctionCallback_Wrapper( CFX_ByteStringC szFunctionName(lpFunctionInfo->name); std::unique_ptr lpThisValue( new CFXJSE_Value(info.GetIsolate())); - lpThisValue->ForceSetValue(info.This()); + lpThisValue->ForceSetValue(info.Holder()); std::unique_ptr lpRetValue(new CFXJSE_Value(info.GetIsolate())); CFXJSE_Arguments impl(&info, lpRetValue.get()); lpFunctionInfo->callbackProc(lpThisValue.get(), szFunctionName, impl); @@ -43,7 +43,7 @@ void V8ClassGlobalConstructorCallback_Wrapper( CFX_ByteStringC szFunctionName(lpClassDefinition->name); std::unique_ptr lpThisValue( new CFXJSE_Value(info.GetIsolate())); - lpThisValue->ForceSetValue(info.This()); + lpThisValue->ForceSetValue(info.Holder()); std::unique_ptr lpRetValue(new CFXJSE_Value(info.GetIsolate())); CFXJSE_Arguments impl(&info, lpRetValue.get()); lpClassDefinition->constructor(lpThisValue.get(), szFunctionName, impl); @@ -64,7 +64,7 @@ void V8GetterCallback_Wrapper(v8::Local property, new CFXJSE_Value(info.GetIsolate())); std::unique_ptr lpPropValue( new CFXJSE_Value(info.GetIsolate())); - lpThisValue->ForceSetValue(info.This()); + lpThisValue->ForceSetValue(info.Holder()); lpPropertyInfo->getProc(lpThisValue.get(), szPropertyName, lpPropValue.get()); info.GetReturnValue().Set(lpPropValue->DirectGetValue()); } @@ -83,7 +83,7 @@ void V8SetterCallback_Wrapper(v8::Local property, new CFXJSE_Value(info.GetIsolate())); std::unique_ptr lpPropValue( new CFXJSE_Value(info.GetIsolate())); - lpThisValue->ForceSetValue(info.This()); + lpThisValue->ForceSetValue(info.Holder()); lpPropValue->ForceSetValue(value); lpPropertyInfo->setProc(lpThisValue.get(), szPropertyName, lpPropValue.get()); } @@ -99,8 +99,8 @@ void V8ConstructorCallback_Wrapper( if (!lpClassDefinition) return; - ASSERT(info.This()->InternalFieldCount()); - info.This()->SetAlignedPointerInInternalField(0, nullptr); + ASSERT(info.Holder()->InternalFieldCount()); + info.Holder()->SetAlignedPointerInInternalField(0, nullptr); } void Context_GlobalObjToString( @@ -119,7 +119,7 @@ void Context_GlobalObjToString( return; } v8::Local local_str = - info.This() + info.Holder() ->ObjectProtoToString(info.GetIsolate()->GetCurrentContext()) .FromMaybe(v8::Local()); info.GetReturnValue().Set(local_str); @@ -137,7 +137,7 @@ void DynPropGetterAdapter_MethodCallback( CFX_ByteStringC szFxPropName = *szPropName; std::unique_ptr lpThisValue( new CFXJSE_Value(info.GetIsolate())); - lpThisValue->ForceSetValue(info.This()); + lpThisValue->ForceSetValue(info.Holder()); std::unique_ptr lpRetValue(new CFXJSE_Value(info.GetIsolate())); CFXJSE_Arguments impl(&info, lpRetValue.get()); lpClass->dynMethodCall(lpThisValue.get(), szFxPropName, impl); @@ -226,7 +226,7 @@ bool DynPropDeleterAdapter(const FXJSE_CLASS_DESCRIPTOR* lpClass, void NamedPropertyQueryCallback( v8::Local property, const v8::PropertyCallbackInfo& info) { - v8::Local thisObject = info.This(); + v8::Local thisObject = info.Holder(); const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast( info.Data().As()->Value()); v8::Isolate* pIsolate = info.GetIsolate(); @@ -247,7 +247,7 @@ void NamedPropertyQueryCallback( void NamedPropertyDeleterCallback( v8::Local property, const v8::PropertyCallbackInfo& info) { - v8::Local thisObject = info.This(); + v8::Local thisObject = info.Holder(); const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast( info.Data().As()->Value()); v8::Isolate* pIsolate = info.GetIsolate(); @@ -264,7 +264,7 @@ void NamedPropertyDeleterCallback( void NamedPropertyGetterCallback( v8::Local property, const v8::PropertyCallbackInfo& info) { - v8::Local thisObject = info.This(); + v8::Local thisObject = info.Holder(); const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast( info.Data().As()->Value()); v8::String::Utf8Value szPropName(property); @@ -282,7 +282,7 @@ void NamedPropertySetterCallback( v8::Local property, v8::Local value, const v8::PropertyCallbackInfo& info) { - v8::Local thisObject = info.This(); + v8::Local thisObject = info.Holder(); const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast( info.Data().As()->Value()); v8::String::Utf8Value szPropName(property); -- cgit v1.2.3