Skip to content

Commit

Permalink
Fix compilation under LLVM 19
Browse files Browse the repository at this point in the history
Compilation currently fails with the new -Wmissing-template-arg-list-after-template-kw
warning, I assume it is an error since Werror is pulled in through a dependency.
To resolve this we just need to drop the template keyword – the default template
argument will be used as before.
  • Loading branch information
fhanau committed Jul 30, 2024
1 parent a633d21 commit cd5279e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/workerd/jsg/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ struct GetterCallback;
auto obj = info.This(); \
auto& wrapper = TypeWrapper::from(isolate); \
/* V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. */\
if (!isContext && !wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) { \
if (!isContext && !wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) { \
throwTypeError(isolate, kIllegalInvocation); \
} \
auto& self = extractInternalPointer<T, isContext>(context, obj); \
Expand All @@ -409,7 +409,7 @@ struct GetterCallback;
auto obj = info.This(); \
auto& wrapper = TypeWrapper::from(isolate); \
/* V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. */\
if (!isContext && !wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) { \
if (!isContext && !wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) { \
throwTypeError(isolate, kIllegalInvocation); \
} \
auto& self = extractInternalPointer<T, isContext>(context, obj); \
Expand Down Expand Up @@ -451,7 +451,7 @@ struct PropertyGetterCallback;
auto obj = info.This(); \
auto& wrapper = TypeWrapper::from(isolate); \
/* V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. */\
if (!isContext && !wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) { \
if (!isContext && !wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) { \
throwTypeError(isolate, kIllegalInvocation); \
} \
auto& self = extractInternalPointer<T, isContext>(context, obj); \
Expand All @@ -477,7 +477,7 @@ struct PropertyGetterCallback;
auto obj = info.This(); \
auto& wrapper = TypeWrapper::from(isolate); \
/* V8 no longer supports AccessorSignature, so we must manually verify `this`'s type. */\
if (!isContext && !wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) { \
if (!isContext && !wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) { \
throwTypeError(isolate, kIllegalInvocation); \
} \
auto& self = extractInternalPointer<T, isContext>(context, obj); \
Expand Down Expand Up @@ -516,7 +516,7 @@ struct SetterCallback<TypeWrapper, methodName, void (T::*)(Arg), method, isConte
auto obj = info.This();
auto& wrapper = TypeWrapper::from(isolate);
// V8 no longer supports AccessorSignature, so we must manually verify `this`'s type.
if (!isContext && !wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
if (!isContext && !wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
throwTypeError(isolate, kIllegalInvocation);
}
auto& self = extractInternalPointer<T, isContext>(context, obj);
Expand All @@ -539,7 +539,7 @@ struct SetterCallback<TypeWrapper, methodName,
auto obj = info.This();
auto& wrapper = TypeWrapper::from(isolate);
// V8 no longer supports AccessorSignature, so we must manually verify `this`'s type.
if (!isContext && !wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
if (!isContext && !wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
throwTypeError(isolate, kIllegalInvocation);
}
auto& self = extractInternalPointer<T, isContext>(context, obj);
Expand All @@ -563,7 +563,7 @@ struct PropertySetterCallback<TypeWrapper, methodName, void (T::*)(Arg), method,
auto obj = info.This();
auto& wrapper = TypeWrapper::from(isolate);
// V8 no longer supports AccessorSignature, so we must manually verify `this`'s type.
if (!isContext && !wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
if (!isContext && !wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
throwTypeError(isolate, kIllegalInvocation);
}
auto& self = extractInternalPointer<T, isContext>(context, obj);
Expand All @@ -585,7 +585,7 @@ struct PropertySetterCallback<TypeWrapper, methodName,
auto obj = info.This();
auto& wrapper = TypeWrapper::from(isolate);
// V8 no longer supports AccessorSignature, so we must manually verify `this`'s type.
if (!isContext && !wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
if (!isContext && !wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
throwTypeError(isolate, kIllegalInvocation);
}
auto& self = extractInternalPointer<T, isContext>(context, obj);
Expand Down Expand Up @@ -760,7 +760,7 @@ struct WildcardPropertyCallbacks<
auto context = isolate->GetCurrentContext();
auto obj = info.This();
auto& wrapper = TypeWrapper::from(isolate);
if (!wrapper.template getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
if (!wrapper.getTemplate(isolate, (T*)nullptr)->HasInstance(obj)) {
throwTypeError(isolate, kIllegalInvocation);
}
auto& self = extractInternalPointer<T, false>(context, obj);
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/jsg/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class Isolate: public IsolateBase {
jsg::JsObject getConstructor(v8::Local<v8::Context> context) {
v8::EscapableHandleScope scope(v8Isolate);
v8::Local<v8::FunctionTemplate> tpl =
jsgIsolate.wrapper->template getTemplate(v8Isolate, (T*)nullptr);
jsgIsolate.wrapper->getTemplate(v8Isolate, (T*)nullptr);
v8::Local<v8::Object> prototype = check(tpl->GetFunction(context));
return jsg::JsObject(scope.Escape(prototype));
}
Expand Down

0 comments on commit cd5279e

Please sign in to comment.