From b9ac257852befa4b2f4701a2c230960cd823607c Mon Sep 17 00:00:00 2001 From: Felix Hanau Date: Tue, 13 Jan 2026 15:06:53 -0500 Subject: [PATCH] Fix deprecation warnings with V8 14.4 PropertyCallbackInfo<>::This() is now deprecated, HolderV2() is to be used instead. --- src/workerd/jsg/resource.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/workerd/jsg/resource.h b/src/workerd/jsg/resource.h index f6020ef01dd..d22024be557 100644 --- a/src/workerd/jsg/resource.h +++ b/src/workerd/jsg/resource.h @@ -635,7 +635,7 @@ struct GetterCallback; liftKj(info, [&]() { \ auto isolate = info.GetIsolate(); \ auto context = isolate->GetCurrentContext(); \ - auto obj = info.This(); \ + auto obj = info.HolderV2(); \ auto& js = Lock::from(isolate); \ auto& wrapper = TypeWrapper::from(isolate); \ /* V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. */ \ @@ -682,7 +682,7 @@ struct GetterCallback; auto isolate = info.GetIsolate(); \ auto context = isolate->GetCurrentContext(); \ auto& js = Lock::from(isolate); \ - auto obj = info.This(); \ + auto obj = info.HolderV2(); \ auto& wrapper = TypeWrapper::from(isolate); \ /* V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. */ \ if (!isContext && \ @@ -880,7 +880,7 @@ struct SetterCallbackGetCurrentContext(); auto& js = Lock::from(isolate); - auto obj = info.This(); + auto obj = info.HolderV2(); auto& wrapper = TypeWrapper::from(isolate); // V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. if (!isContext && !wrapper.getTemplate(isolate, static_cast(nullptr))->HasInstance(obj)) { @@ -906,7 +906,7 @@ struct SetterCallbackGetCurrentContext(); - auto obj = info.This(); + auto obj = info.HolderV2(); auto& wrapper = TypeWrapper::from(isolate); // V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. if (!isContext && !wrapper.getTemplate(isolate, static_cast(nullptr))->HasInstance(obj)) { @@ -1193,7 +1193,7 @@ struct WildcardPropertyCallbacks v8::Local { auto isolate = info.GetIsolate(); auto context = isolate->GetCurrentContext(); - auto obj = info.This(); + auto obj = info.HolderV2(); auto& wrapper = TypeWrapper::from(isolate); if (!wrapper.getTemplate(isolate, static_cast(nullptr))->HasInstance(obj)) { throwTypeError(isolate, kIllegalInvocation);