Skip to content

Commit b9ac257

Browse files
committed
Fix deprecation warnings with V8 14.4
PropertyCallbackInfo<>::This() is now deprecated, HolderV2() is to be used instead.
1 parent 5f00731 commit b9ac257

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/workerd/jsg/resource.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ struct GetterCallback;
635635
liftKj(info, [&]() { \
636636
auto isolate = info.GetIsolate(); \
637637
auto context = isolate->GetCurrentContext(); \
638-
auto obj = info.This(); \
638+
auto obj = info.HolderV2(); \
639639
auto& js = Lock::from(isolate); \
640640
auto& wrapper = TypeWrapper::from(isolate); \
641641
/* V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. */ \
@@ -682,7 +682,7 @@ struct GetterCallback;
682682
auto isolate = info.GetIsolate(); \
683683
auto context = isolate->GetCurrentContext(); \
684684
auto& js = Lock::from(isolate); \
685-
auto obj = info.This(); \
685+
auto obj = info.HolderV2(); \
686686
auto& wrapper = TypeWrapper::from(isolate); \
687687
/* V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. */ \
688688
if (!isContext && \
@@ -880,7 +880,7 @@ struct SetterCallback<TypeWrapper, methodName, void (T::*)(Arg), method, isConte
880880
auto isolate = info.GetIsolate();
881881
auto context = isolate->GetCurrentContext();
882882
auto& js = Lock::from(isolate);
883-
auto obj = info.This();
883+
auto obj = info.HolderV2();
884884
auto& wrapper = TypeWrapper::from(isolate);
885885
// V8 no longer supports AccessorSignature, so we must manually verify `this`'s type.
886886
if (!isContext && !wrapper.getTemplate(isolate, static_cast<T*>(nullptr))->HasInstance(obj)) {
@@ -906,7 +906,7 @@ struct SetterCallback<TypeWrapper, methodName, void (T::*)(Lock&, Arg), method,
906906
liftKj(info, [&]() {
907907
auto isolate = info.GetIsolate();
908908
auto context = isolate->GetCurrentContext();
909-
auto obj = info.This();
909+
auto obj = info.HolderV2();
910910
auto& wrapper = TypeWrapper::from(isolate);
911911
// V8 no longer supports AccessorSignature, so we must manually verify `this`'s type.
912912
if (!isContext && !wrapper.getTemplate(isolate, static_cast<T*>(nullptr))->HasInstance(obj)) {
@@ -1193,7 +1193,7 @@ struct WildcardPropertyCallbacks<TypeWrapper,
11931193
liftKj(info, [&]() -> v8::Local<v8::Value> {
11941194
auto isolate = info.GetIsolate();
11951195
auto context = isolate->GetCurrentContext();
1196-
auto obj = info.This();
1196+
auto obj = info.HolderV2();
11971197
auto& wrapper = TypeWrapper::from(isolate);
11981198
if (!wrapper.getTemplate(isolate, static_cast<T*>(nullptr))->HasInstance(obj)) {
11991199
throwTypeError(isolate, kIllegalInvocation);

0 commit comments

Comments
 (0)