From b9eb82b378d7e367bbe963a78a7d19cf9ca5cf50 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Fri, 9 Jan 2026 20:58:48 +0000 Subject: [PATCH] chore: update WebKit to ESM bytecode cache preview build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use WebKit preview-pr-132-c6592bfb which includes the ESM bytecode cache hooks (hasCachedModuleMetadata, createModuleRecordFromCache) cherry-picked onto the latest WebKit main. Also add 'override' keywords to the SourceProvider methods now that the base class has the virtual methods. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- cmake/tools/SetupWebKit.cmake | 2 +- src/bun.js/bindings/ZigSourceProvider.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cmake/tools/SetupWebKit.cmake b/cmake/tools/SetupWebKit.cmake index 6fbc28f805..49c43deb2b 100644 --- a/cmake/tools/SetupWebKit.cmake +++ b/cmake/tools/SetupWebKit.cmake @@ -2,7 +2,7 @@ option(WEBKIT_VERSION "The version of WebKit to use") option(WEBKIT_LOCAL "If a local version of WebKit should be used instead of downloading") if(NOT WEBKIT_VERSION) - set(WEBKIT_VERSION 1d0216219a3c52cb85195f48f19ba7d5db747ff7) + set(WEBKIT_VERSION preview-pr-132-c6592bfb) endif() string(SUBSTRING ${WEBKIT_VERSION} 0 16 WEBKIT_VERSION_PREFIX) diff --git a/src/bun.js/bindings/ZigSourceProvider.h b/src/bun.js/bindings/ZigSourceProvider.h index ef5e703bf3..786b2ca629 100644 --- a/src/bun.js/bindings/ZigSourceProvider.h +++ b/src/bun.js/bindings/ZigSourceProvider.h @@ -91,16 +91,14 @@ public: }; // ESM bytecode cache support - // TODO: Add 'override' once oven-sh/WebKit adds virtual methods to - // JSC::SourceProvider for hasCachedModuleMetadata/createModuleRecordFromCache - bool hasCachedModuleMetadata() const + bool hasCachedModuleMetadata() const override { return m_cachedModuleMetadata.has_value(); } JSC::JSModuleRecord* createModuleRecordFromCache( JSC::JSGlobalObject* globalObject, - const JSC::Identifier& moduleKey); + const JSC::Identifier& moduleKey) override; void updateCache(const UnlinkedFunctionExecutable* executable, const SourceCode&, CodeSpecializationKind kind, const UnlinkedFunctionCodeBlock* codeBlock); void cacheBytecode(const BytecodeCacheGenerator& generator);