Upgrade WebKit to 24362e675175#32105
Merged
Jarred-Sumner merged 4 commits intoJun 12, 2026
Merged
Conversation
Collaborator
|
Updated 9:27 AM PT - Jun 11th, 2026
❌ @sosukesuzuki, your commit d39bacb has 1 failures in
Add 🧪 To try this PR locally: bunx bun-pr 32105That installs a local version of the PR into your bun-32105 --bun |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
|
Found 7 issues this PR may fix:
🤖 Generated with Claude Code |
Adapt to upstream JSC API changes: - VM::getHostFunction gained an unsigned length parameter; name and length now live on the NativeExecutable - JSFunction::finishCreation(VM&, NativeExecutable*, unsigned, const String&) was removed; subclasses use the default finishCreation(VM&) Binary size grows ~200-530 KB per platform from upstream additions (notably Temporal.ZonedDateTime). [skip size check]
dd001f9 to
d11ea2b
Compare
…upgrade-24362e675175 [skip size check]
7ebd220 to
dbda0f1
Compare
Fixes the macOS x64 segfault at parse time: alignas(64) Lexer was heap-allocated without its required alignment because the FastMalloc class allocator macros lacked align_val_t overloads. [skip size check]
[skip size check]
acf96b0
into
claude/webkit-upgrade-51cc3feb7298
77 checks passed
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.
Note
Stacked on #31796 (base branch is
claude/webkit-upgrade-51cc3feb7298). Retarget tomainafter #31796 merges.WEBKIT_VERSIONcurrently points at the preview buildautobuild-preview-pr-251-10fc0cabfrom oven-sh/WebKit#251. After that PR merges, bump it to the merge commit'sautobuild-<sha>release before merging this PR.Bun-side changes
VM::getHostFunctiongained anunsigned lengthparameter (name/length now live on theNativeExecutable), andJSFunction::finishCreation(VM&, NativeExecutable*, unsigned, const String&)was deleted upstream. UpdatedJSWrappingFunction,JSFFIFunction,NapiClass, andJSSQLStatementConstructorto pass length/name throughgetHostFunctionand use the defaultfinishCreation(VM&).WebKit-fork-side changes (in the merge, oven-sh/WebKit#251)
USE(BUN_JSC_ADDITIONS)AsyncLocalStorage context wrapping to upstream's reworked internals:InternalMicrotask::AsyncGeneratorResumeNext→AsyncGeneratorAwaitReturn, andPromise.prototype.finallycontexts now useJSSlimPromiseReactioninstead ofJSPromiseCombinatorsGlobalContext.miglookup falls back tofind_programwhenWebKitXcodeSDK.cmakeisn't included (Linux-hosted macOS build); the newInlineCacheHandler::offsetOfUid() == 40layout-driftstatic_assertis skipped on Windows, where the MSVC ABI ignores[[no_unique_address]]and the offset is 48.Verification
return/throw, AsyncLocalStorage acrossawait/.finally()/for await,Promise.prototype.finallysemantics, sqlite, andexpect.extend.AsyncLocalStorage.test.ts,async-local-storage-thenable.test.ts,AsyncLocalStorage-tracking.test.ts(74 pass),ffi.test.js, napi name tests — all green.WebKit upgrade:
51cc3feb7298→24362e67517583 commits touching
Source/JavaScriptCore,Source/WTF, andSource/bmalloc.Highlights (Bun-relevant)
JSType.his unchanged in this range — no JSType additions or reordering, so Bun's JSType-based checks need no updates.NativeExecutable gains
name/length, JSFunctionfinishCreationoverloads deleted (a633a8abfee7, 316443). NativeExecutable now stores name and length the same way FunctionExecutable does, sobindon native functions stops hitting the slow path. Embedder-visible API changes:NativeExecutable::create(...)and bothVM::getHostFunction(...)overloads take a newunsigned lengthparameter beforename.JSFunction::finishCreation(VM&, NativeExecutable*, unsigned length, const String& name)(and the ASSERT-onlyfinishCreation(VM&)) are deleted, replaced byDECLARE_DEFAULT_FINISH_CREATION. Subclasses that called the old overload must pass length/name throughNativeExecutableinstead.JSNativeStdFunction::create/JSFunctionWithFields::createno longer take separate length/name arguments where the executable already carries them. NewNativeExecutable::length()andnameJSString(VM&)accessors.Async generators rewritten to current spec (
d096ff9cfae1, 316447).InternalMicrotask::AsyncGeneratorResumeNextis renamed toAsyncGeneratorAwaitReturn(enum inMicrotask.h; corresponding link-time constant removed). The generator state machine replacesAwaitingReturnwith a newDrainingQueuestate and adds aYieldNoAwaitsuspend reason (reason bit-field widened from 1 to 2 bits).%AsyncGeneratorPrototype%.return/.throwmove from JS builtins to C++ host functions. Fixes re-entrancy confusion whenObject.prototype.thenis patched.Promise internals cleanup (
7b0aff184802, 316553).JSPromiseCombinatorsGlobalContextis no longer used as a generic cell holder:Promise.prototype.finallynow stores its context in aJSSlimPromiseReactioninstead. The combinator context itself now uses auint64_tremaining-elements count. (Builds ona633a8abfee7, which already touched the samefinallyhost functions.)GC / Heap changes:
e69c47917811(311420): Heap now protects StringImpls swapped out byJSString::swapToAtomStringwhile aGCOwnedDataScopeis on the stack —m_possiblyAccessedStringsFromConcurrentThreadsbecomes a(JSString*, String)pair list pruned via conservative-root discovery instead of cleared wholesale. Fixes a dangling-buffer bug.c8e53c74403f(316635):Heap::clearConcurrentRetainedDataIfPossible()no longer runs while concurrent marking is active — fixes a collector-thread use-after-free on racily-loaded StringImpls.441e3da20428(316713):deleteUnmarkedCompiledCodenow runs with an unset AtomStringTable inHeap::runEndPhase.4d73bc11dd6c(316385):FreeList::forEachinterval assert bounded byMarkedBlock::blockSize.Module loader fixes:
5c64352cd6cc(316615):GatherAvailableAncestors/AsyncModuleExecutionRejectedinCyclicModuleRecordmade iterative — no more stack overflow on deep async module graphs (top-level-await chains).e46667fac721(316610): deferred module namespace objects (import defer) no longer leak the synthetic"then"intoObject.keys.WTF changes embedders may feel:
aae76637c06f(316554):URLParser/IDNA — ASCII domains can no longer fail IDNA mapping, even when they start withxn--. AffectsWTF::URLhost parsing behavior.59604007e4c6(316511):clampToInteger<T>inMathExtras.hnow correctly clamps values belowINT_MIN.3997b5c96e77(316692): revert of anAutomaticThreadchange that introduced a race permanently inflating the active thread count (affected JIT/Wasm worklist threads).6667782c52fa(316510): missingreturnstatements fixed inLazyRef.h/LazyUniqueRef.h.wtf/MainThreadData.h,wtf/StatisticsManager.{h,cpp}(dead-code sweeps012c64ce3ab1,5101cdc679ab); JSC dropsdfg/DFGPropertyTypeKey.hand the unusedTemporalTimeZone*classes.Codebase-wide C++ modernization that can affect Bun's C++ bindings compile:
ab23e0e34b7c(304023) uses C++20 concepts across JSC (touchesWriteBarrier.h,CagedBarrierPtr.h);f582e488dbf4(316055) replaces C-style arrays withWTF::toArray();66a98ce83600(316364) guardsPlatform.hdefines with!defined()checks.New language / runtime features
Temporal.ZonedDateTimeimplemented (27ac373783f0, 315939) — ~7.5k lines; the largest change in the range. Follow-ups: carry non-primary time zones (c39b3d4d67cb, 316517), spec-aligned option helpers / Duration internals and removal of the obsoleteTemporalTimeZoneclasses (063066dc87c7, 316370),destroyfunction forTemporalZonedDateTime(1c8ae9884a85, 316334).SetFunctionNamebytecode (b6a9b84dae1f, 316646).Tableconstructor fills funcref tables correctly when the default value is a wrapper function (7a35a1699bc9, 316280).Performance
MultiGetByVal/MultiPutByValnodes for polymorphic array access (8f6bc9a16adf, 315832).RegExp.prototype[Symbol.match]moved from JS builtin to C++ with DFG intrinsic support (e922a2cecfac, 316509).2a8223d802c8, 316491), optimized ParenContext save/restore (eef93d3c2048, 316555), FixedCount model changed from save-at-END to save-at-BEGIN (a92d79b27748, 316275),ParenthesesSubpatternFixedCountnow supports captures (3f58e2018a6b, 316599).8243c6b69d66, 316211), InlineCacheHandler (8cb7e38ecdc8, 316163); WasmFuncRefTableentry size reduced (8abf5256fdcb, 316305).c6900eb69893, 316548); redundant eagerlengthdefinition removed fromJSPromiseConstructor(deb8f86fbe49, 316478).UCalendarcached per CalendarID (7636f6149708, 316569).Fixes
Spec correctness / runtime:
IteratorClosewhen the callback throws (84a71a9868ed, 316495).String#splitRegExp fast path missed side effects ofToString(this)/ToUint32(limit)(b4b15818d650, 316508).isDefinitelyNonThenableStructure cache could go stale when the prototype belongs to another realm (8d6b11214830, 316506) — affects promise resolution fast paths.6da8ead481eb, 316472).Array.prototype.sortOSR exit (e7d51d19e065, 316296).e6d0f57f8d04, 316288); interpreter greedy backtracking now tries up to max count (5fe4838cb7d1, 316378).Wasm:
24362e675175, 309538).memory.atomic.notify/waitandmemory.growmishandled dirty upper bits of i32 operands (a0d2eebf9e13, 316507).c18d1e3571f4, 316227).Temporal / Intl hardening (mostly crash and OOB fixes in the new Temporal code):
ISO8601::parseDateon short invalid strings (d58bad697e50, 316366); crash inPlainMonthDay.fromwith very large strings (221dcc89aba8, 316805); double-throw crash in Temporal constructors (19e18af9f088, 316793);PlainDateadd/subtract day-range assertion (2c290815d421, 316368).178eab311235, 316346);toIntegerWithTruncationfor Temporal conversions (66267990831b, 316369); Japanese era fast-path validation (31e50e893a11, 316477); date-spec invariants (544a3bff9b31, 316440).Intl.DateTimeFormatwith Temporal types: era width preserved (9cd3289437d5, 316048); calendar passed to ICU in BCP47 form (45b638378595, 315984).Build / misc:
ee637a607df2, 316381;6c8b20e9f7b2, 316374); PlayStation SIMDUTF AVX-512 build fix (08e30f68509b, 316649).c9e9995641cc→653a36adb39a→09f89f078e7d, 316232); assorted CMake configuration changes (Apple SDK/ICU handling, configure-time probe skipping).012c64ce3ab1, 316520;5101cdc679ab, 316502); libpas test harness changes (e7665a906ab0, 316595;1a8a72a5bc1a, 316457).calc-mix(), MediaSession, and visionOS test changes that only incidentally touch generated inspector code underSource/JavaScriptCore/inspector.