summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_class.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-22 13:58:45 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-22 19:57:44 +0000
commit2fbfb84aedccefbd1c1a7bb2c5b2a723b3f3dd77 (patch)
tree48e73b3f91c8d448baa384b03dc700c476be3560 /fxjs/cfxjse_class.cpp
parent3d06022ce5e7467c2ee12da97a2492b5be23885e (diff)
downloadpdfium-2fbfb84aedccefbd1c1a7bb2c5b2a723b3f3dd77.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_class.cpp')
-rw-r--r--fxjs/cfxjse_class.cpp24
1 files 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<CFXJSE_Value> lpThisValue(
new CFXJSE_Value(info.GetIsolate()));
- lpThisValue->ForceSetValue(info.This());
+ lpThisValue->ForceSetValue(info.Holder());
std::unique_ptr<CFXJSE_Value> 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<CFXJSE_Value> lpThisValue(
new CFXJSE_Value(info.GetIsolate()));
- lpThisValue->ForceSetValue(info.This());
+ lpThisValue->ForceSetValue(info.Holder());
std::unique_ptr<CFXJSE_Value> 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<v8::String> property,
new CFXJSE_Value(info.GetIsolate()));
std::unique_ptr<CFXJSE_Value> 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<v8::String> property,
new CFXJSE_Value(info.GetIsolate()));
std::unique_ptr<CFXJSE_Value> 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<v8::String> local_str =
- info.This()
+ info.Holder()
->ObjectProtoToString(info.GetIsolate()->GetCurrentContext())
.FromMaybe(v8::Local<v8::String>());
info.GetReturnValue().Set(local_str);
@@ -137,7 +137,7 @@ void DynPropGetterAdapter_MethodCallback(
CFX_ByteStringC szFxPropName = *szPropName;
std::unique_ptr<CFXJSE_Value> lpThisValue(
new CFXJSE_Value(info.GetIsolate()));
- lpThisValue->ForceSetValue(info.This());
+ lpThisValue->ForceSetValue(info.Holder());
std::unique_ptr<CFXJSE_Value> 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<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Integer>& info) {
- v8::Local<v8::Object> thisObject = info.This();
+ v8::Local<v8::Object> thisObject = info.Holder();
const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>(
info.Data().As<v8::External>()->Value());
v8::Isolate* pIsolate = info.GetIsolate();
@@ -247,7 +247,7 @@ void NamedPropertyQueryCallback(
void NamedPropertyDeleterCallback(
v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Boolean>& info) {
- v8::Local<v8::Object> thisObject = info.This();
+ v8::Local<v8::Object> thisObject = info.Holder();
const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>(
info.Data().As<v8::External>()->Value());
v8::Isolate* pIsolate = info.GetIsolate();
@@ -264,7 +264,7 @@ void NamedPropertyDeleterCallback(
void NamedPropertyGetterCallback(
v8::Local<v8::Name> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
- v8::Local<v8::Object> thisObject = info.This();
+ v8::Local<v8::Object> thisObject = info.Holder();
const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>(
info.Data().As<v8::External>()->Value());
v8::String::Utf8Value szPropName(property);
@@ -282,7 +282,7 @@ void NamedPropertySetterCallback(
v8::Local<v8::Name> property,
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<v8::Value>& info) {
- v8::Local<v8::Object> thisObject = info.This();
+ v8::Local<v8::Object> thisObject = info.Holder();
const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>(
info.Data().As<v8::External>()->Value());
v8::String::Utf8Value szPropName(property);