diff --git Source/WTF/wtf/PointerPreparations.h Source/WTF/wtf/PointerPreparations.h
index ef20a5e48512..ef9495169ff4 100644
--- Source/WTF/wtf/PointerPreparations.h
+++ Source/WTF/wtf/PointerPreparations.h
@@ -34,16 +34,16 @@ namespace WTF {
 #if COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)

 template<typename T>
-ALWAYS_INLINE void* getVTablePointer(T* o) { return __builtin_get_vtable_pointer(o); }
+ALWAYS_INLINE const void* getVTablePointer(T* o) { return __builtin_get_vtable_pointer(o); }

 #else // not COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)

 #if CPU(ARM64E)
 template<typename T>
-ALWAYS_INLINE void* getVTablePointer(T* o) { return __builtin_ptrauth_auth(*(reinterpret_cast<void**>(o)), ptrauth_key_cxx_vtable_pointer, 0); }
+ALWAYS_INLINE const void* getVTablePointer(T* o) { return __builtin_ptrauth_auth(*(reinterpret_cast<void**>(o)), ptrauth_key_cxx_vtable_pointer, 0); }
 #else // not CPU(ARM64E)
 template<typename T>
-ALWAYS_INLINE void* getVTablePointer(T* o) { return (*(reinterpret_cast<void**>(o))); }
+ALWAYS_INLINE const void* getVTablePointer(T* o) { return (*(reinterpret_cast<void**>(o))); }
 #endif // not CPU(ARM64E)

 #endif // not COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)
diff --git Source/WebCore/bindings/scripts/CodeGeneratorJS.pm Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 35db4d28ccd6..03dd9c161a83 100644
--- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -4881,7 +4881,7 @@ END
         push(@implContent, <<END) if $vtableNameGnu;

 #if ENABLE(BINDING_INTEGRITY)
-    void* actualVTablePointer = getVTablePointer(impl.ptr());
+    const void* actualVTablePointer = getVTablePointer(impl.ptr());
 #if PLATFORM(WIN)
     void* expectedVTablePointer = ${vtableRefWin};
 #else
