Skip to content

Commit 184ce44

Browse files
authored
Merge pull request #5908 from cloudflare/jlee/fix-v8-this-warnings
jsg/resource.h: Temporarily suppress V8 deprecation warnings
2 parents f013954 + fad65c4 commit 184ce44

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/workerd/jsg/resource.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
#include <type_traits>
3030
#include <typeindex>
3131

32+
// TODO(soon): Resolve .This() -> .HolderV2() deprecation warnings, then remove this pragma.
33+
#pragma clang diagnostic push
34+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
35+
3236
namespace std {
3337
inline auto KJ_HASHCODE(const std::type_index& idx) {
3438
// Make std::type_index (which points to std::type_info) usable as a kj::HashMap key.
@@ -880,6 +884,8 @@ struct SetterCallback<TypeWrapper, methodName, void (T::*)(Arg), method, isConte
880884
auto isolate = info.GetIsolate();
881885
auto context = isolate->GetCurrentContext();
882886
auto& js = Lock::from(isolate);
887+
// TODO(soon): resolve .This() -> .HolderV2() deprecation message. When doing so, please
888+
// also remove the "#pragma clang diagnostic ignored "-Wdeprecated-declarations"" above.
883889
auto obj = info.This();
884890
auto& wrapper = TypeWrapper::from(isolate);
885891
// V8 no longer supports AccessorSignature, so we must manually verify `this`'s type.
@@ -1998,4 +2004,7 @@ class ObjectWrapper {
19982004
kj::Maybe<v8::Local<v8::Object>> parentObject) = delete;
19992005
};
20002006

2007+
// TODO(soon): Resolve .This() -> .HolderV2() deprecation warnings, then remove this pragma.
2008+
#pragma clang diagnostic pop
2009+
20012010
} // namespace workerd::jsg

0 commit comments

Comments
 (0)