Bump WebKit (oven-sh/WebKit#526 preview): honor a deferred GC request at the next VM entry - #40679
Draft
dylan-conway wants to merge 5 commits into
Draft
dylan-conway wants to merge 5 commits into
dylan-conway wants to merge 5 commits into
Conversation
…ises With WebKit 86e19b8edd7c, ModuleRegistryEntry::provideModule() records the source and module record without creating the fetch/module/load promises, and markLoaded() tells the loader the record's [[LoadedModules]] is complete; the loader materializes a settled promise only if some later load asks for one. Use those instead of building a resolved load promise per module. For a ~600-chunk compiled app this removes ~1,900 JSPromise allocations from startup (2,986 -> 1,118 during --help); behaviour and host-hook counts are unchanged.
… module evaluation without a promise per import edge
…ettling a load promise No-Verification-Needed: comment-only change.
Collaborator
|
Updated 6:44 PM PT - Aug 27th, 2026
❌ @dylan-conway, your commit de03a01 has 2 failures in
🧪 To try this PR locally: bunx bun-pr 40679That installs a local version of the PR into your bun-40679 --bun |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Points
WEBKIT_VERSIONat the preview build of oven-sh/WebKit#526 (autobuild-preview-pr-526-6473271a) so the full test matrix runs against it — in particulartest/cli/run/require-cache.test.tson Windows x64, which has failed onmainsince the 8c4fd56347 WebKit upgrade (#40276).Stacked on #40674 because the preview is built on oven-sh/WebKit
main, which already contains the module-loader changes that PR adapts to. The only change on top of #40674 is the version string. Draft: for CI validation of the WebKit change; the real bump lands once oven-sh/WebKit#526 is merged.Why
require-cache.test.ts › via require() with a lot of function callsre-requires a 100 KB module 500 times, doesBun.gc(true), and reads RSS. What it trips over is not a leak: JSC leaves a GC request pending (m_didDeferGCWork) when it is raised underDeferGCForAWhile— which is where the ~4 MB/iteration of CodeBlock metadata and baseline JIT code is reported — and nothing on this path picks it up for 30–90 iterations, so 100–280 MB of dead CodeBlocks pile into MarkedBlocks that are never swept again until the final synchronous GC, whose freed pages libpas returns ~100–250 ms after the test has read RSS. The WebKit PR honors the pending request at the next VM entry; details and measurements (perf/RSS/CPU across 17 workloads, GC counts unchanged) are in oven-sh/WebKit#526.