Repository navigation
Upgrade to upstream WebKit e8f704815e94 - #923
Merged
Merged
Conversation
https://bugs.webkit.org/show_bug.cgi?id=328765 Reviewed by Carlos Garcia Campos. toStandardGamepadButton() maps the evdev code BTN_X to StandardGamepadButton::X and BTN_Y to StandardGamepadButton::Y. In <linux/input-event-codes.h> these names are aliases for button positions: BTN_X == BTN_NORTH (top) and BTN_Y == BTN_WEST (left), and libmanette follows that convention. Since X came before Y in the enum, the top face button was reported as buttons[2] (left) and the left face button as buttons[3] (top) of the W3C standard gamepad layout. Swap X and Y in StandardGamepadButton so that Y (BTN_WEST) is index 2 and X (BTN_NORTH) is index 3, matching the standard layout and the WPE implementation in WPEGamepadManette. No new tests. * Source/WebCore/platform/gamepad/manette/ManetteGamepad.h: Canonical link: https://commits.webkit.org/324633@main
…anchorShift()` https://bugs.webkit.org/show_bug.cgi?id=328760 rdar://190887304 Reviewed by Nikolas Zimmermann. In layoutTextOnTextPath(), the local accumulator `anchorShift` shadowed the member function of the same name, forcing the call to be written as `this->anchorShift(chunk)`. Rename the local to `totalAnchorShift` so the member function can be called directly and the two can't be confused. No behavior change. * Source/WebCore/rendering/svg/SVGTextLayoutAlgorithm.cpp: (WebCore::SVGTextLayoutAlgorithm::positionOnPaths): Canonical link: https://commits.webkit.org/324634@main
https://bugs.webkit.org/show_bug.cgi?id=328789 Reviewed by Carlos Garcia Campos. Add an option to run the requested API tests several times in a row, as run-webkit-tests does, to find out whether a test is flaky. It repeats what it is given: a whole test binary, or only the requested subtests. A test fails if any of the runs gives an unexpected result. This will be used to stress the tests a change modifies. * Tools/Scripts/webkitpy/api_tests/glib_api_test_runner_unittest.py: (StubExpectations): (RepeatingStubTestRunner): (GLibAPITestRunnerTest.test_repeat_each_runs_the_requested_tests_every_time): (GLibAPITestRunnerTest.test_repeat_each_keeps_the_first_unexpected_result): * Tools/glib/api_test_runner.py: (TestRunner._run_test_repeatedly): (TestRunner.run_tests): (create_option_parser): Canonical link: https://commits.webkit.org/324635@main
https://bugs.webkit.org/show_bug.cgi?id=328796 Reviewed by Carlos Garcia Campos. Add an option to run the API tests a change modifies, instead of a test list. Comparing with the merge base of the given ref, it selects: - GLib test programs whose source changed. FooTest.cpp, the web process side of a test, selects TestFoo. - Google Test cases defined in a changed source, when the program lists them. - Tests and subtests whose expectations changed. With -l, it only lists them. This will be used to stress the tests a change modifies. * Tools/Scripts/webkitpy/api_tests/glib_api_test_runner_unittest.py: (StubTestRunner.is_glib_test): (ChangedTestsStubTestRunner): (GLibAPITestRunnerTest._create_source_repository): (GLibAPITestRunnerTest._git): (GLibAPITestRunnerTest._write_sources): (GLibAPITestRunnerTest._changed_tests): (GLibAPITestRunnerTest.test_changed_glib_test_source_selects_its_whole_program): (GLibAPITestRunnerTest.test_changed_google_test_source_selects_its_available_cases): (GLibAPITestRunnerTest.test_changed_expectations_select_their_tests): (GLibAPITestRunnerTest.test_deleted_test_source_selects_nothing): * Tools/glib/api_test_runner.py: (TestRunner.__init__): (TestRunner._source_directory): (TestRunner._git): (TestRunner._changed_expectations): (TestRunner._changed_source_tests): (TestRunner._changed_tests): (TestRunner.run_tests): (create_option_parser): Canonical link: https://commits.webkit.org/324636@main
https://bugs.webkit.org/show_bug.cgi?id=328825 Reviewed by Zak Ridouh. This is groundwork for enabling adaptive unified sources (314224@main) on GTK and WPE. There, Source/cmake/ninja-wrapper runs a dry run (ninja -n) before each build to count the dirty unified source bundles, and compiles them whole or as separate members depending on the count. When the dry run reports that CMake has to re-run, the wrapper cannot count and compiles bundles whole, which is today's behaviour. FindGI.cmake expands the API directories passed to GI_INTROSPECT with a CONFIGURE_DEPENDS glob. That adds a glob re-check to build.ninja whose edge is always dirty by design, so a dry run reports a CMake re-run on every build and the wrapper would never see the bundle count on these ports. The re-check is redundant here: every file in those directories is also listed in a Sources*.txt or CMake file, which already triggers a reconfigure when a source is added, removed or renamed, and the glob is re-evaluated then. Without it the only difference is for a file dropped into one of the directories that nothing compiles. * Source/cmake/FindGI.cmake: (GI_INTROSPECT): Canonical link: https://commits.webkit.org/324637@main
…ouTube.com https://bugs.webkit.org/show_bug.cgi?id=325264 rdar://188374134 Reviewed by Cameron McCormack. On macOS, threaded animations are applied from the scrolling thread using `CAPresentationModifier` objects grouped in a `CAPresentationModifierGroup`. We used to flush those using `-flush` after updating their values on a display refresh in `RemoteAnimationStack::applyEffects()`. By default, a presentation modifier group updates asynchronously: `-flush` only publishes the new values to the render server through shared memory, without notifying it, and the render server checks the group for new values continuously. As a result, as long as a presentation modifier is attached to a layer, its context always appears to need an update. When the animated layer contributes to the rendered output, this only means the render server updates on every frame. But when it does not, for instance when the layer is fully covered by an opaque layer in a fullscreen window, as can happen with a video player in fullscreen on YouTube, WindowServer finds that there is nothing to update and immediately schedules another update, spinning through thousands of no-op update passes per second. This causes a large increase in CPU usage and power consumption. We now opt out of asynchronous updates and use `-flushWithTransaction` instead, so that the render server only looks at new values when we commit a transaction. On the scrolling thread, we now commit the current transaction after updating animations rather than before, so that scroll position changes and animated values reach the render server together. This means one transaction commit per animation update from the scrolling thread. That costs a bit more CPU in the UI process and in WindowServer while an animation runs in a regular window, but it reduces the cost of visible animations in a fullscreen window since the render server no longer needs to check the group on every frame. This is a performance improvement observed in Apple-internal performance infrastructure, this doesn't change the observable behavior in layout tests (specifically webanimations/threaded-animations). Thanks to this change we can remove the quirk for YouTube added in bug 325263. * LayoutTests/fast/quirks/active-quirks-by-domain-expected.txt: * LayoutTests/platform/ios/fast/quirks/active-quirks-by-domain-expected.txt: * Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h: * Source/WebCore/page/QuirkTable.json: * Source/WebKit/UIProcess/RemoteLayerTree/RemoteAnimationStack.mm: (WebKit::RemoteAnimationStack::initEffectsFromMainThread): (WebKit::RemoteAnimationStack::applyEffects const): * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.mm: (WebKit::RemoteLayerTreeEventDispatcher::updateLayerPositionsAndAnimations): Canonical link: https://commits.webkit.org/324638@main
https://bugs.webkit.org/show_bug.cgi?id=328834 Unreviewed, associate media/media-source/media-source-seek-to-zero-then-play.html with an actual open bug report. * LayoutTests/platform/glib/TestExpectations: Canonical link: https://commits.webkit.org/324639@main
https://bugs.webkit.org/show_bug.cgi?id=328807 rdar://190923178 Reviewed by Eric Carlson. AudioDecoderCocoa failed to decode any flac stream. The WebCodecs flac description, the "fLaC" stream marker followed by the metadata blocks, isn't a magic cookie AudioToolbox understands: kAudioFormatProperty_FormatInfo rejected it, so InternalAudioDecoderCocoa::initialize() fell back to a format description without a cookie and with no frames per packet. AudioConverterNew() then failed with 'what' on the first decoded chunk, and decoding was rejected with an EncodingError. 100% failure, regardless of the number of channels. AudioToolbox expects the cookie AudioFile returns for flac files: a 'dfLa' box holding the STREAMINFO block alone; it rejects a box that also contains the other metadata blocks. createFLACMagicCookie() builds that box from the description, and a description that doesn't start with the "fLaC" marker followed by a STREAMINFO block now fails configuration. Test: http/wpt/webcodecs/audio-decoder-flac-multichannels.html * LayoutTests/http/wpt/webcodecs/audio-decoder-flac-multichannels-expected.txt: Added. * LayoutTests/http/wpt/webcodecs/audio-decoder-flac-multichannels.html: Added. * LayoutTests/http/wpt/webcodecs/resources/sfx-5.1.flac: Added. * Source/WebCore/platform/audio/AudioUtilities.cpp: (WebCore::AudioUtilities::createFLACMagicCookie): Added. (WebCore::AudioUtilities::flacDescriptionFromFLACMagicCookie): * Source/WebCore/platform/audio/AudioUtilities.h: * Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.cpp: (WebCore::InternalAudioDecoderCocoa::initialize): Convert the flac description into a 'dfLa' magic cookie. * Tools/TestWebKitAPI/Tests/WebCore/cocoa/MediaSamplesDecoderTests.mm: (TestWebKitAPI::parseFLACFile): (TestWebKitAPI::TEST(MediaSamplesDecoder, FrameCountMatchesWebAudioFLAC)): Fix bad expectations and properly extra the FLAC description from AVFileReader magic cookie Canonical link: https://commits.webkit.org/324640@main
rdar://190565448 https://bugs.webkit.org/show_bug.cgi?id=328038 Reviewed by Taher Ali. Update all https://svgwg.org/* to https://w3c.github.io/svgwg/* * LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-on-svg-text-content-element.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-images/object-fit-fill-svg-with-natural-size-and-viewbox.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform-box/svgbox-stroke-box-002.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform-box/svgbox-stroke-box-003.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform-box/svgbox-stroke-box-004.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/transform-box/svgbox-stroke-box-005.html: * LayoutTests/imported/w3c/web-platform-tests/css/motion/animation/offset-path-interpolation-002.html: * LayoutTests/imported/w3c/web-platform-tests/css/motion/animation/offset-path-interpolation-004.html: * LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-url-002.html: * LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-url-003.html: * LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-url-004.html: * LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-url-005.html: * LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-url-006.html: * LayoutTests/imported/w3c/web-platform-tests/css/motion/offset-path-url-007.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-additive-sum-both-empty-over-base.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-by-animation-empty-base.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-from-by-animation-both-empty.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-from-by-animation-empty-by.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-from-by-animation-empty-from.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-from-to-accumulate-sum-empty-base.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-from-to-animation-both-empty.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-from-to-animation-empty-from.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-from-to-animation-empty-to.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-path-to-animation-empty-base.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-path-moveto-only.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animateMotion-path-zero-length-subpaths.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/pause-and-seek-before-begin.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/scripted/smil-values-empty-segments.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/smil-detach-releases-animated-presentation-attribute.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/smil-values-trailing-semicolon.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/svglengthlist-animation-percentage.html: * LayoutTests/imported/w3c/web-platform-tests/svg/as-image/sprite-sheet-fractional-size.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-does-not-affect-img.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-ignores-svg-root-viewbox.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-meet-svg-viewbox-only.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-meet-svg-with-size.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-none-animated-viewbox.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-none-shared-document.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-none-svg-viewbox-only.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-overrides-svg-root.html: * LayoutTests/imported/w3c/web-platform-tests/svg/embedded/image-preserveaspectratio-slice-svg.html: * LayoutTests/imported/w3c/web-platform-tests/svg/geometry/svg-length-convert-to-percentage-precision.html: * LayoutTests/imported/w3c/web-platform-tests/svg/interact/scripted/pointer-events-fill-stroke-hittest.html: * LayoutTests/imported/w3c/web-platform-tests/svg/interact/scripted/pointer-events-getBoundingClientRect.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-decimal-values.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-img-element.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-invalid-negative-width.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-invalid-zero-height.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-invalid-zero-width.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-last-wins.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-overflow-clamped-nonzero-origin.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-overflow-clamped.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-percent-full.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-percent-img-element.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-percent-no-natural-size.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-percent-nonsquare.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-percent-viewbox-no-size.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-percent-zero-size.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-percent.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-pixel-explicit.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-pixel-implicit.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-viewbox-only.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/media-fragment-spatial-viewbox-width.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/reftests/svgview-and-xywh.html: * LayoutTests/imported/w3c/web-platform-tests/svg/linking/scripted/a.target-dynamic-update.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/getPathData-css-d-vs-attribute.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/getPathData-detached-element.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/getPathData-during-smil-animation.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/getPathData-during-web-animation.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/getPathData-empty-or-missing-d.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/getPathData-malformed-d.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/getPathData-normalize.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/getPathData-segments.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/setPathData-css-d.tentative.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/setPathData-during-animation.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/setPathData-malformed.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/setPathData-mutation-observer.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/setPathData-overrides-d.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/setPathData-plain-object.html: * LayoutTests/imported/w3c/web-platform-tests/svg/path/interfaces/setPathData-segment-types.html: * LayoutTests/imported/w3c/web-platform-tests/svg/resources/svg-transform-equals.js: * LayoutTests/imported/w3c/web-platform-tests/svg/struct/reftests/use-image-href-mutating.svg: * LayoutTests/imported/w3c/web-platform-tests/svg/struct/reftests/use-symbol-inline-css-003.svg: * LayoutTests/imported/w3c/web-platform-tests/svg/styling/attr-style-media-dynamic.html: * LayoutTests/imported/w3c/web-platform-tests/svg/styling/attr-style-type-dynamic.html: * LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/textLength-list-x-spacingAndGlyphs.svg: * LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/textLength-list-y-spacing.svg: * LayoutTests/imported/w3c/web-platform-tests/svg/text/reftests/textLength-list-y-spacingAndGlyphs.svg: * LayoutTests/imported/w3c/web-platform-tests/svg/text/scripted/getstartpositionofchar-dominant-baseline-shift.html: Canonical link: https://commits.webkit.org/324641@main
https://bugs.webkit.org/show_bug.cgi?id=327969 Reviewed by Adrian Perez de Castro. Most of the dynamic relocations of the WebKit libraries are relative ones, and every process reads all of them when it starts. Link with -z pack-relative-relocs, which stores them in the much smaller DT_RELR format, when the toolchain and the C library support it. On WPE, the relocations of libWPEWebKit go from 8.1 MB to 2 MB, the library is 6 MB smaller, and the total PSS of the UI, Web and Network processes is about 7.5 MB lower. * Source/cmake/OptionsCommon.cmake: Canonical link: https://commits.webkit.org/324642@main
https://bugs.webkit.org/show_bug.cgi?id=328669 rdar://190648659 Reviewed by Lily Spiniolas. When Site Isolation or AlwaysUseTouchEventRegions is enabled, iOS finds touch handlers by hit-testing the event regions in the layer tree, not the event tracking regions in the scrolling tree. Tests that read the scrolling tree regions (internals.touchEventRectsForEvent(), internals.passiveTouchEventListenerRects(), or the region dumps from internals.scrollingStateTreeAsText()) only test the legacy path. Force those tests to use AlwaysUseTouchEventRegions=false and SiteIsolationEnabled=false, so that they keep testing it and pass with --site-isolation-enabled-by-default. Most of these tests already have a touch event regions version in touch-event-regions-layer-tree/. This patch adds tests for the ones without an equivalent: - Add touch-event-regions-layer-tree/input/listener-types.html for touch-event-regions.html, to test touchmove, touchend, and touchforcechange listener regions. - Add touch-event-regions-layer-tree/scrolling/overflow-without-listeners.html and overflow-with-passive-document-listeners.html to check that an overflow scroller gets synchronous touch regions when it has no listeners, has passive listeners on the scroller, or has passive listeners on the document. - Add touch-event-regions-layer-tree/dispatch/tap-with-active-touch-end-listener.html, which taps the same targets as tap-with-active-touch-end-listener.html and dumps the event region in place of the scrolling state tree. Each legacy test has a "Touch event regions equivalent:" comment and each corresponding touch event regions test has a "Legacy touch event rects equivalent:" comment. Also sort the event-specific synchronous regions when dumping EventTrackingRegions. Previously the regions were printed in HashMap iteration order, which made it harder to write consistent expected results. Also rebaseline the affected expected results. Tests: fast/events/touch/ios/touch-event-regions-layer-tree/dispatch/listener-changes-after-rendering-update.html fast/events/touch/ios/touch-event-regions-layer-tree/dispatch/tap-with-active-touch-end-listener.html fast/events/touch/ios/touch-event-regions-layer-tree/input/listener-types.html fast/events/touch/ios/touch-event-regions-layer-tree/scrolling/overflow-with-passive-document-listeners.html fast/events/touch/ios/touch-event-regions-layer-tree/scrolling/overflow-without-listeners.html http/tests/site-isolation/touch-events/tap-after-adding-listener-in-idle-cross-origin-iframe.html * LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html: * LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html: * LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html: * LayoutTests/fast/events/touch/ios/tap-with-active-touch-end-listener.html: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/active-passive-nesting.html: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/columns.html: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/complex.html: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/dispatch/listener-changes-after-rendering-update-expected.txt: Added. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/dispatch/listener-changes-after-rendering-update.html: Added. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/dispatch/tap-with-active-touch-end-listener-expected.txt: Added. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/dispatch/tap-with-active-touch-end-listener.html: Copied from LayoutTests/fast/events/touch/ios/tap-with-active-touch-end-listener.html. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/document.html: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/iframes.html: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/input-type-change-expected.txt: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/listener-types-expected.txt: Added. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/listener-types.html: Added. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/range-enablement-expected.txt: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/range-sliders-expected.txt: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/range-sliders.html: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/switch-enablement-expected.txt: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/switch-expected.txt: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/overflow.html: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/scrolling/overflow-with-passive-document-listeners-expected.txt: Copied from LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/input/range-enablement-expected.txt. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/scrolling/overflow-with-passive-document-listeners.html: Added. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/scrolling/overflow-without-listeners-expected.txt: Added. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/scrolling/overflow-without-listeners.html: Added. * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/scrolling/scrolled-overflow-expected.txt: * LayoutTests/fast/events/touch/ios/touch-event-regions-layer-tree/scrolling/scrolled-overflow.html: * LayoutTests/fast/events/touch/ios/touch-event-regions.html: * LayoutTests/fast/events/touch/ios/touch-event-regions/active-passive-nesting.html: * LayoutTests/fast/events/touch/ios/touch-event-regions/columns.html: * LayoutTests/fast/events/touch/ios/touch-event-regions/complex.html: * LayoutTests/fast/events/touch/ios/touch-event-regions/document.html: * LayoutTests/fast/events/touch/ios/touch-event-regions/iframes.html: * LayoutTests/fast/events/touch/ios/touch-event-regions/overflow.html: * LayoutTests/fast/events/touch/ios/touch-event-regions/range-sliders.html: * LayoutTests/fast/events/touch/ios/touch-event-regions/scrolled-overflow.html: * LayoutTests/http/tests/fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html: * LayoutTests/http/tests/fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html: * LayoutTests/http/tests/site-isolation/touch-events/resources/add-touch-listener-on-message.html: Added. * LayoutTests/http/tests/site-isolation/touch-events/tap-after-adding-listener-in-idle-cross-origin-iframe-expected.txt: Added. * LayoutTests/http/tests/site-isolation/touch-events/tap-after-adding-listener-in-idle-cross-origin-iframe.html: Added. * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/ios/editing/editable-region/iframe-expected.txt: * LayoutTests/platform/ios/editing/editable-region/iframe-without-editable-region-expected.txt: * LayoutTests/platform/ios/editing/editable-region/overflow-scroll-text-field-and-contenteditable-expected.txt: * Source/WebCore/dom/Document.cpp: (WebCore::Document::wheelOrTouchEventHandlersChanged): * Source/WebCore/platform/EventTrackingRegions.cpp: (WebCore::operator<<): Canonical link: https://commits.webkit.org/324643@main
…lAddresses time out on some bots rdar://190916266 Reviewed by Wenson Hsieh. Both tests load markup containing <img src="https://example.com/..."> into a web view that has no proxy, so the load event waits on a real network fetch. On bots without outbound network access the fetch hangs instead of failing, and the test times out. Serve these images from a local HTTPServer acting as an HTTPS proxy instead. load(html:) temporarily replaces the navigation delegate, so the tests call loadHTMLString and wait with _test_waitForDidFinishNavigationWhileIgnoringSSLErrors() to accept the server's self-signed certificate. The helper functions in replacementStringsForEmailAddresses are now nested in the closure passed to HTTPServer.run, so they are explicitly marked @mainactor to keep their previous isolation. invalidURLsAreSkipped also never covered invalid image URLs: its image assertions pass even without the !url.isValid() check that 309452@main added to TextExtractionAggregator::stringForURL. The "invalid" image source " not a valid src " is a relative URL, so it resolves against the base URL to a valid file URL, and the check that the output does not contain "not a valid" only passes because the spaces are percent-encoded. Even with a truly invalid image URL, the test only extracts with shortenURLs enabled, and an invalid image URL shortens to an empty name, so the output is the same with or without the check. Use an absolute URL with spaces in the host as the invalid image source, and extract with shortenURLs both enabled and disabled. With the check removed, the test now fails for the image as well as for the link. * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.swift: (TextExtractionTests.replacementStringsForEmailAddresses): (TextExtractionTests.invalidURLsAreSkipped): Canonical link: https://commits.webkit.org/324644@main
…ng it Unreviewed build fix. Overload resolution for TextStream << IntRect considers the constrained Color constructor while IntRect is incomplete, and GCC 16 warns with -Wsfinae-incomplete. Include IntRect.h. * Tools/TestWebKitAPI/Helpers/WebCoreTestUtilities.h: Canonical link: https://commits.webkit.org/324645@main
…ableSpatialImage not the other way around https://bugs.webkit.org/show_bug.cgi?id=328844 Reviewed by Nikolas Zimmermann. To help with future layering changes, this removes the dependency on BitmapImage for ShareableBitmap and ShareableSpatialImage. * Source/WebCore/platform/graphics/BitmapImage.cpp: * Source/WebCore/platform/graphics/BitmapImage.h: * Source/WebCore/platform/graphics/Image.cpp: * Source/WebCore/platform/graphics/ShareableBitmap.h: * Source/WebCore/platform/graphics/cairo/ShareableBitmapCairo.cpp: * Source/WebCore/platform/graphics/cg/ShareableBitmapCG.mm: * Source/WebCore/platform/graphics/cg/ShareableSpatialImage.cpp: * Source/WebCore/platform/graphics/cg/ShareableSpatialImage.h: * Source/WebCore/platform/graphics/skia/ShareableBitmapSkia.cpp: * Source/WebKit/UIProcess/API/gtk/DragSourceGtk4.cpp: * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp: * Source/WebKit/WebProcess/Plugins/PluginView.cpp: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: * Tools/TestWebKitAPI/Tests/WebCore/cocoa/ShareableSpatialImageTests.mm: Canonical link: https://commits.webkit.org/324646@main
Unreviewed build fix. - AudioContext is final, so GCC 16 turns the delete in the inline deref() used by JSInternals.cpp into a direct call to ~AudioContext(), which is not exported. Export it. - WebExtensionContextAPIDeclarativeNetRequest.cpp calls loadDeclarativeNetRequestRules(), which is only defined for Cocoa. With clang, --gc-sections discards the caller, but not with GCC 16. Add a GLib stub. * Source/WebCore/Modules/webaudio/AudioContext.h: * Source/WebKit/UIProcess/Extensions/glib/WebExtensionContextGLib.cpp: (WebKit::WebExtensionContext::loadDeclarativeNetRequestRules): Canonical link: https://commits.webkit.org/324647@main
… linking it https://bugs.webkit.org/show_bug.cgi?id=327957 Reviewed by Philippe Normand. Linking Flite put its 13 libraries in every WebKit process. One voice that WebKit doesn't even use, cmu_time_awb, has over 31,000 symbol relocations against itself, about half of all the symbol bindings the dynamic linker does when a WebKit process starts. Each of those lookups searches the global scope of 168 libraries. Load the Flite libraries and the four voices WebKit uses with dlopen() the first time speech synthesis needs them, and call Flite through the resolved functions. Without Flite at runtime, speech synthesis now offers no voices instead of crashing. A bare WPEWebProcess goes from 34 ms to 22 ms from exec to exit, and from 168 to 154 libraries. * Source/WebCore/platform/GStreamer.cmake: * Source/WebCore/platform/gstreamer/GUniquePtrFlite.h: * Source/WebCore/platform/gstreamer/WebKitFliteSourceGStreamer.cpp: (fliteSymbol): (fliteLibrary): (WebCore::fliteDeleteVoice): (WebCore::fliteDeleteWave): (webkitFliteSrcCreate): (fliteVoices): (ensureFliteVoicesInitialized): (webKitFliteSrcSetUtterance): (WTF::toArray): Deleted. Canonical link: https://commits.webkit.org/324648@main
…t when a child has a percentage height https://bugs.webkit.org/show_bug.cgi?id=328483 <rdar://problem/190727077> Reviewed by Antti Koivisto. RenderBox computed intrinsic widths for calc-size() on an auto width, and for an out-of-flow box's aspect-ratio automatic minimum, without IntrinsicLogicalWidthComputationScope. So an aspect-ratio box took its height from its stale width, a child's percentage height resolved, and calc-size(auto, size) differed from max-content. Both paths now set the scope, like the min-content and max-content contribution getters do. Test: imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-aspect-ratio-percentage-height-001.html * LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-aspect-ratio-percentage-height-001-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-values/calc-size/calc-size-aspect-ratio-percentage-height-001.html: Added. * Source/WebCore/rendering/RenderBox.cpp: (WebCore::RenderBox::computeCalcSizeOnAutoLogicalWidth const): (WebCore::RenderBox::computeOutOfFlowPositionedLogicalWidthUsing const): Canonical link: https://commits.webkit.org/324649@main
…fore it https://bugs.webkit.org/show_bug.cgi?id=328791 Reviewed by Darin Adler. Removes the fragment directive from a URL before passing the fragment to an SVG image. For example, an image URL like foo.svg#box:~:param(--bg, green) was previously passing "box:~:param(--bg, green)" to the SVG element as the target and now just passes "box" (the "param(--bg, green)" is passed separately as link parameters already). No spec says whether this is the correct behavior, but it really is the only thing that makes sense. I have filed w3c/csswg-drafts#14656 to track getting the specs updated. Also removes CursorImage's override of drawingExtrasForRenderer() which was unnecessary and incomplete. Instead, the default implementation in MultiImage that forwards is used. Tests: imported/w3c/web-platform-tests/svg/styling/css-linked-parameters/link-parameters-fragment-identifier-background.html imported/w3c/web-platform-tests/svg/styling/css-linked-parameters/link-parameters-fragment-identifier.html Tools/TestWebKitAPI/Tests/WTF/Vector.cpp * LayoutTests/imported/w3c/web-platform-tests/svg/styling/css-linked-parameters/link-parameters-fragment-identifier-background-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/svg/styling/css-linked-parameters/link-parameters-fragment-identifier-background.html: Added. * LayoutTests/imported/w3c/web-platform-tests/svg/styling/css-linked-parameters/link-parameters-fragment-identifier-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/svg/styling/css-linked-parameters/link-parameters-fragment-identifier-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/svg/styling/css-linked-parameters/link-parameters-fragment-identifier.html: Added. * LayoutTests/imported/w3c/web-platform-tests/svg/styling/css-linked-parameters/resources/target.svg: Added. * Source/WTF/wtf/Vector.h: * Source/WebCore/css/parser/CSSPropertyParserConsumer+LinkParameters.cpp: * Source/WebCore/css/parser/CSSPropertyParserConsumer+LinkParameters.h: * Source/WebCore/style/values/images/kinds/StyleCachedImage.cpp: * Source/WebCore/style/values/images/kinds/StyleCachedImage.h: * Source/WebCore/style/values/images/kinds/StyleCursorImage.cpp: * Source/WebCore/style/values/images/kinds/StyleCursorImage.h: * Tools/TestWebKitAPI/Tests/WTF/Vector.cpp: Canonical link: https://commits.webkit.org/324650@main
https://bugs.webkit.org/show_bug.cgi?id=328814 rdar://190928214 Reviewed by Wenson Hsieh. Added quirks for HomeView. Test: Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp * Source/WebCore/PAL/pal/spi/ios/MobileGestaltSPI.h: * Source/WebCore/PAL/pal/system/ios/Device.cpp: (PAL::deviceClassIsHomeView): (PAL::setDeviceClassIsHomeViewForTesting): * Source/WebCore/PAL/pal/system/ios/Device.h: * Source/WebCore/page/QuirkBehaviors.yaml: * Source/WebCore/page/QuirkBuildConditions.yaml: * Source/WebCore/page/QuirkMatchPattern.cpp: (WebCore::evaluateURLEnvironment): * Source/WebCore/page/QuirkMatchPattern.h: * Source/WebCore/page/QuirkTable.json: * Source/WebCore/page/Quirks.cpp: (WebCore::Quirks::needsDesktopUserAgent): (WebCore::needsDesktopUserAgentInternal): Deleted. (WebCore::Quirks::defaultVisibilityAdjustmentSelectors): (WebCore::Quirks::determineRelevantQuirks): (WebCore::shouldPreventOrientationMediaQueryFromEvaluatingToLandscapeInternal): Deleted. * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: * LayoutTests/platform/ios/fast/quirks/active-quirks-by-domain-expected.txt: * LayoutTests/platform/ipad/fast/quirks/active-quirks-by-domain-expected.txt: * Tools/TestWebKitAPI/Tests/WebCore/Quirks.cpp: Canonical link: https://commits.webkit.org/324651@main
… its top and bottom margins to its container's width https://bugs.webkit.org/show_bug.cgi?id=328556 <rdar://problem/190767962> Reviewed by Antti Koivisto. Finding an orthogonal box's block size lays out its content, which rewrites the box's only BoxGeometry in the box's own writing mode. The container's intrinsic width then gets the box's top and bottom margins instead of its left and right ones. Put the geometry the line has for the box back once the render tree is done with it. Layout handles the same overlap in BoxGeometryUpdater::updateBoxGeometryAfterIntegrationLayout. * LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/orthogonal-block-in-inline-inline-size-002-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-writing-modes/orthogonal-block-in-inline-inline-size-002.html: Added. * Source/WebCore/layout/integration/LayoutIntegrationFormattingContextLayout.cpp: (WebCore::LayoutIntegration::formattingContextRootLogicalWidthForType): Canonical link: https://commits.webkit.org/324652@main
… while creating new meeting https://bugs.webkit.org/show_bug.cgi?id=328593 <rdar://190772090> Reviewed by Antti Koivisto. <div style="display: flex; align-items: center; height: 60px"> <div><button style="height: 40px">Details</button></div> </div> button::after { content: "Details"; display: block; height: 0; overflow: hidden } The button should be vertically centered in the bar. Instead it was pushed up past the bar's top edge - the button's baseline came from the line inside the clipped ::after, below the button's bottom edge, so the line box (and the flex item) grew taller than the bar. The button's baseline comes from RenderBlock::lastLineBaseline on its anonymous inner block, which descended into the overflow: hidden child and took the line inside it. CSS Align says a block container that is a scroll container has its last baseline at its block-end margin edge (an inline-block <div> with the same content already did this through lastInflowBoxBaseline). Apply that rule to scroll container children in RenderBlock::lastLineBaseline. * LayoutTests/imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/overflow-hidden-block-child-baseline{,-ref,-expected}.html: Added. * Source/WebCore/rendering/RenderBlock.cpp: (WebCore::RenderBlock::lastLineBaseline const): Canonical link: https://commits.webkit.org/324653@main
https://bugs.webkit.org/show_bug.cgi?id=272474 rdar://126634062 Reviewed by Devin Rousso and BJ Burg. Fix by Daniel Jalkut <[email protected]>, completed by Alexey Proskuryakov. The attached inspector lays out itself and the inspected view by setting their frames. When the inspected view is placed with Auto Layout, its constraints undo that on the next layout pass, and it covers the inspector, which then looks blank. Captive Network Assistant's web view is one such case. While the inspector is attached to such a view, put the view in a container that takes its place in the layout, and holds both views laid out by their frames. Detaching puts everything back the way the app set it up. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/WKInspectorAttachment.mm * Source/WebKit/UIProcess/API/Cocoa/_WKInspectorPrivateForTesting.h: * Source/WebKit/UIProcess/API/Cocoa/_WKInspectorTesting.mm: (-[_WKInspector _attachRightForTesting]): (-[_WKInspector _attachLeftForTesting]): Added. * Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.h: Added a weak reference to the container. The container is owned by the view hierarchy, and it retains the inspected view, which retains its page and this object. * Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm: (removeFromArrangedSubviews): NSStackView makes the constraints for its arranged subviews, so take the view out of them first, and the constraints that remain are the app's. Returns what's needed to put the container in the same place: the index within the view's gravity area when the stack view uses gravity areas, and the stack view's spacing and visibility priority for the view. (insertIntoArrangedSubviews): Added. (constraintsPlacingView): Find the constraints that relate the view to the views around it. These can be installed on any ancestor, up to the content view's superview when they refer to the window's content layout guide. Constraints between the view and its own subviews stay with it. (copyConstraint): Recreate a constraint for the container, keeping its priority and identifier. (isSingleItemConstraint): Added. (canActivateConstraint): Activating a constraint between views without a common ancestor raises an exception, which could happen if the app removed a view while the inspector was attached. An inactive NSLayoutConstraint doesn't keep its items alive, so check the weak references saved with it instead of the items themselves. (canWrapInspectedView): Leave the view in place when its superview keeps track of it as a particular child (the window's content view, a scroll view's document view, a box's content view, or a tab's view), when it's a split view pane, when it has an intrinsic content size, and when no constraints place it. Taking a pane out of a split view removes it from the window. (reactivateConstraintsPlacingView): Added. Constraints that the app activates for the inspected view while the inspector is attached conflict with the container's layout, and AppKit leaves the ones it breaks out of the layout until they are activated again. (restoreAutoLayout): Added. (restoreAutoLayoutElsewhere): Added. When the inspected view is no longer where the container is, its constraints to other views don't apply, but its own size constraints do. (-[WKInspectorAttachmentContainerView initWithInspectedView:]): Take over the inspected view's constraints and its position among its siblings. Add the container to the window before moving the inspected view into it, so that the inspected view doesn't leave the window. (-[WKInspectorAttachmentContainerView dealloc]): If the app released the views around the container while the inspector was attached, give the inspected view its layout properties and its own size constraints back. (-[WKInspectorAttachmentContainerView _startObservingInspectedViewConstraints]): (-[WKInspectorAttachmentContainerView _stopObservingInspectedViewConstraints]): (-[WKInspectorAttachmentContainerView observeValueForKeyPath:ofObject:change:context:]): Note which of its saved constraints the app activates or deactivates while the inspector is attached, such as when it replaces one. (-[WKInspectorAttachmentContainerView _moveAppSubviewsToSuperview:]): Added. Views that the app added to the inspected view's superview while the inspector was attached are in the container, so move them out, together with their constraints. (-[WKInspectorAttachmentContainerView restoreInspectedView]): Put the inspected view back with its original constraints and autoresizing properties, leaving the constraints that the app activated or deactivated meanwhile as the app set them, and making sure that the ones it activated take effect. If the app moved or removed the view while the inspector was attached, give it back its own layout properties, because the app may add constraints for its new place later. Returns whether the inspected view uses Auto Layout again. (unwrapInspectedView): Added. Returns whether the inspected view uses Auto Layout again. (WebKit::WebInspectorUIProxy::platformAttach): Wrap an inspected view that uses Auto Layout when possible, and unwrap the previous one if the attachment view has changed. (WebKit::WebInspectorUIProxy::platformDetach): Unwrap. If the inspected view doesn't use Auto Layout again, size it to take up the space that the attached inspector used to, as before. * Tools/TestWebKitAPI/PlatformCocoa.cmake: * Tools/TestWebKitAPI/SourcesMac.txt: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/WKInspectorAttachment.mm: Added. (TestWebKitAPI::createWindow): (TestWebKitAPI::createWebView): (TestWebKitAPI::pinToEdges): (TestWebKitAPI::frameInWindow): (TestWebKitAPI::showInspector): (TestWebKitAPI::attachInspector): (TestWebKitAPI::expectInspectorAttachedNextTo): (TestWebKitAPI::detachAndCloseInspector): (TestWebKitAPI::resetInspectorToOpenDetached): (TestWebKitAPI::expectActive): (TestWebKitAPI::expectStaysInSuperviewWhileAttached): Added helpers. (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewUsingAutoresizing)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewInSplitView)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewAsWindowContentView)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewAsDocumentView)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewInBox)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewPlacedByFrameWithoutConstraints)): (TestWebKitAPI::TEST(WKInspectorAttachment, AttachmentViewUsingAutoresizingDockedOnSides)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewInTabView)): These pass without the fix, and check that it leaves views that don't need a container, or can't be given one, alone. (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewUsingAutoLayout)): (TestWebKitAPI::TEST(WKInspectorAttachment, AppReplacesConstraintWhileAttached)): (TestWebKitAPI::TEST(WKInspectorAttachment, CloseWhileAttachedToWebViewUsingAutoLayout)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewUsingAutoLayoutKeepsConstraintPriorities)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewUsingAutoLayoutKeepsSiblingOrder)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewUsingContentLayoutGuide)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewInStackView)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewInStackViewGravityArea)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewMovedWhileAttached)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewRemovedWhileAttached)): (TestWebKitAPI::TEST(WKInspectorAttachment, ViewInWebViewConstraintReleasedWhileAttached)): (TestWebKitAPI::TEST(WKInspectorAttachment, WebViewMovedWhileAttachedAndConstrainedAfterDetaching)): (TestWebKitAPI::TEST(WKInspectorAttachment, AppAddsViewNextToWebViewWhileAttached)): (TestWebKitAPI::TEST(WKInspectorAttachment, ClosingWindowReleasesWebViewUsingAutoLayout)): These fail without the fix. * Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebViewInspectorAttachmentTests.swift: Added. (WebViewInspectorAttachmentTests.webView): (WebViewInspectorAttachmentTests.viewRepresentable): SwiftUI hosts views with autoresizing, so these pass without the fix, and check that attaching to a SwiftUI WebView, or a WKWebView in an NSViewRepresentable, keeps working. Canonical link: https://commits.webkit.org/324654@main
… and BitmapImage https://bugs.webkit.org/show_bug.cgi?id=328843 Reviewed by Darin Adler and Nikolas Zimmermann. Removes a bunch of unnecessary includes and forward declarations. * Source/WebCore/platform/ContextMenuItem.h: * Source/WebCore/platform/NowPlayingManager.h: * Source/WebCore/platform/glib/PasteboardGLib.cpp: * Source/WebCore/platform/graphics/GraphicsContextGL.h: * Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.cpp: * Source/WebCore/platform/graphics/GraphicsLayer.h: * Source/WebCore/platform/graphics/ImageBuffer.cpp: * Source/WebCore/platform/graphics/ImageBufferBackend.h: * Source/WebCore/platform/graphics/Pattern.cpp: * Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h: * Source/WebCore/platform/graphics/cairo/CairoOperations.cpp: * Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp: * Source/WebCore/platform/graphics/cairo/ImageBufferCairoSurfaceBackend.cpp: * Source/WebCore/platform/graphics/cocoa/IconCocoa.mm: * Source/WebCore/platform/graphics/coordinated/GraphicsLayerCoordinated.cpp: * Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorder.cpp: * Source/WebCore/platform/graphics/displaylists/DisplayListItems.h: * Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h: * Source/WebCore/platform/graphics/filters/FEImage.h: * Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp: * Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h: * Source/WebCore/platform/graphics/texmap/TextureMapper.cpp: * Source/WebCore/platform/graphics/texmap/TextureMapperTile.h: * Source/WebCore/platform/ios/PasteboardIOS.mm: * Source/WebCore/platform/ios/PlatformPasteboardIOS.mm: * Source/WebCore/platform/mac/PasteboardMac.mm: * Source/WebCore/platform/mediastream/RealtimeMediaSource.h: * Source/WebCore/platform/skia/DragImageSkia.cpp: * Source/WebCore/platform/win/CursorWin.cpp: * Source/WebCore/platform/win/PasteboardWin.cpp: * Source/WebCore/platform/win/cairo/DragImageWinCairo.cpp: Canonical link: https://commits.webkit.org/324655@main
…was only wrapping one https://bugs.webkit.org/show_bug.cgi?id=328854 Reviewed by Darin Adler. A few places wrapped a NativeImage in a BitmapImage just to draw it. Instead, we can use the NativeImage directly. To make transitioning from BitmapImage to NativeImage easier, give NativeImage the same overloads that BitmapImage has for drawing plus an extra default zero point for the one that takes a FloatPoint. * Source/WebCore/html/ImageBitmap.cpp: * Source/WebCore/page/ContextMenuContext.h: * Source/WebCore/page/ContextMenuController.cpp: * Source/WebCore/page/ElementTargetingController.cpp: * Source/WebCore/page/ElementTargetingController.h: * Source/WebCore/platform/graphics/GraphicsContext.cpp: * Source/WebCore/platform/graphics/GraphicsContext.h: * Source/WebCore/rendering/mac/RenderThemeMac.mm: * Source/WebKit/Shared/ContextMenuContextData.cpp: * Source/WebKit/Shared/ContextMenuContextData.h: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: Canonical link: https://commits.webkit.org/324656@main
…r intrinsic contribution https://bugs.webkit.org/show_bug.cgi?id=328540 <rdar://problem/190759697> Reviewed by Antti Koivisto. FlexLayout::computeIntrinsicLogicalWidths laid out an orthogonal flex item before asking computeIntrinsicLogicalHeight for its block-axis size. Since 317781@main, computeIntrinsicLogicalHeight lays out a dirty box itself, which block layout already relies on. Drop the extra layout, as block layout does. * Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp: (WebCore::LayoutIntegration::FlexLayout::computeIntrinsicLogicalWidths const): Canonical link: https://commits.webkit.org/324657@main
https://bugs.webkit.org/show_bug.cgi?id=328361 rdar://190635008 Reviewed by Pascoe. Implement the new WebAuthn extension for fallback URL. Tests: http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url-csp.https.html http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url-disabled.https.html http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url.https.html * LayoutTests/http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url-csp.https-expected.txt: Added. * LayoutTests/http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url-csp.https.html: Added. * LayoutTests/http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url-disabled.https-expected.txt: Added. * LayoutTests/http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url-disabled.https.html: Added. * LayoutTests/http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url.https-expected.txt: Added. * LayoutTests/http/wpt/webauthn/public-key-credential-get-cross-device-fallback-url.https.html: Added. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-input.xcfilelist: * Source/WebCore/DerivedSources-output.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/Headers.cmake: * Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientInputs.cpp: (WebCore::AuthenticationExtensionsClientInputs::fromCBOR): (WebCore::AuthenticationExtensionsClientInputs::toCBOR const): * Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientInputs.h: * Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientInputs.idl: * Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientInputsJSON.h: * Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientInputsJSON.idl: * Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp: (WebCore::AuthenticatorCoordinator::create): (WebCore::AuthenticatorCoordinator::discoverFromExternalSource): * Source/WebCore/Modules/webauthn/AuthenticatorResponseData.h: (WebCore::AuthenticatorResponseData::AuthenticatorResponseData): (WebCore::AuthenticatorResponseData::getSerializableForm const): * Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp: (WebCore::fromJSON): * Source/WebCore/Modules/webauthn/WebAuthenticationUtils.cpp: (WebCore::validateCrossDeviceFallbackURL): * Source/WebCore/Modules/webauthn/WebAuthenticationUtils.h: * Source/WebCore/Modules/webauthn/WebAuthnOperationErrorCode.h: Copied from Source/WebKit/UIProcess/WebAuthentication/RelatedOriginsValidator.h. * Source/WebCore/Modules/webauthn/WebAuthnOperationErrorCode.idl: Copied from Source/WebKit/UIProcess/WebAuthentication/RelatedOriginsValidator.h. * Source/WebCore/Modules/webauthn/WebAuthnOperationException.cpp: Copied from Source/WebKit/UIProcess/WebAuthentication/RelatedOriginsValidator.h. (WebCore::WebAuthnOperationException::create): (WebCore::WebAuthnOperationException::WebAuthnOperationException): * Source/WebCore/Modules/webauthn/WebAuthnOperationException.h: Copied from Source/WebKit/UIProcess/WebAuthentication/RelatedOriginsValidator.h. (isType): * Source/WebCore/Modules/webauthn/WebAuthnOperationException.idl: Copied from Source/WebKit/UIProcess/WebAuthentication/RelatedOriginsValidator.h. * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: * Source/WebCore/bindings/js/WebCoreJSClientData.cpp: (WebCore::JSHeapData::JSHeapData): * Source/WebCore/bindings/js/WebCoreJSClientData.h: * Source/WebCore/dom/DOMException.h: * Source/WebKit/Shared/WebCoreArgumentCodersAuth.serialization.in: * Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesForwardDeclarations.h: (NS_ERROR_ENUM): * Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm: (WebKit::WebAuthenticatorCoordinatorProxy::requestsForAssertion): (WebKit::WebAuthenticatorCoordinatorProxy::performRequest): (WebKit::WebAuthenticatorCoordinatorProxy::performRequestWithValidatedRelyingPartyIdentifier): * Source/WebKit/UIProcess/WebAuthentication/RelatedOriginsValidator.cpp: (WebKit::RelatedOriginsValidation::validate): * Source/WebKit/UIProcess/WebAuthentication/RelatedOriginsValidator.h: * Source/WebCore/Modules/credentialmanagement/CredentialsContainer.h: (WebCore::CredentialsContainer::document): * Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.h: Canonical link: https://commits.webkit.org/324658@main
…nDownBy to 1.0 for video https://bugs.webkit.org/show_bug.cgi?id=328829 rdar://190945797 Reviewed by Youenn Fablet. Per the setParameters validation steps [1], for a video sender each encoding that doesn't contain a scaleResolutionDownBy member must have one added with the value 1.0. addTransceiver() already did this, but setParameters() left the field unset, so a subsequent getParameters() returned undefined. Default a missing value to 1 in the video branch of RTCRtpSender::setParameters(). [1] https://w3c.github.io/webrtc-pc/#dom-rtcrtpsender-setparameters * LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCRtpParameters-encodings_rest-expected.txt: Progression * Source/WebCore/Modules/mediastream/RTCRtpSender.cpp: (WebCore::RTCRtpSender::setParameters): Canonical link: https://commits.webkit.org/324659@main
…radius https://bugs.webkit.org/show_bug.cgi?id=328841 rdar://190954429 Reviewed by Nikolas Zimmermann. An outermost <svg> with border-radius is painted with rounded corners, but elementFromPoint() returns the <svg> for points in the cut-off corners. A <div> with the same size and border-radius returns its parent there. Chrome and Firefox return the parent for both. CSS Backgrounds says event handling follows the curves: other effects that clip painting or event handling to the border, padding, or content edge must clip to their respective curves. For example, [...] pointer events to the curved border edge, etc. https://drafts.csswg.org/css-backgrounds-3/#corner-clipping RenderBox::nodeAtPoint() and RenderBlock::nodeAtPoint() both call hitTestBorderRadius() before they record a hit on their own background. Both SVG root renderers replace nodeAtPoint() and only checked that the point is inside the border box rectangle. Add the same hitTestBorderRadius() check to the step that reports a hit on the <svg> element itself, in LegacyRenderSVGRoot and in RenderSVGRoot. SVG children are still tested first and are not affected by the root's border-radius, which matches what a <div> does. Test: imported/w3c/web-platform-tests/svg/interact/scripted/svg-root-border-radius.html * LayoutTests/imported/w3c/web-platform-tests/svg/interact/scripted/svg-root-border-radius-expected.txt: * Source/WebCore/rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint): * Source/WebCore/rendering/svg/legacy/LegacyRenderSVGRoot.cpp: (WebCore::LegacyRenderSVGRoot::nodeAtPoint): Canonical link: https://commits.webkit.org/324660@main
…an inline box gets the wrong baseline https://bugs.webkit.org/show_bug.cgi?id=328596 <rdar://problem/190786587> Reviewed by Antti Koivisto. <div style="display: flex; align-items: center; height: 60px"> <div><div style="display: inline-block; height: 40px"> <span>Details<div style="height: 0; overflow: hidden">Details</div></span> </div></div> </div> The inline-block should be vertically centered in the bar. Instead it was pushed up past the bar's top edge - its baseline came from the line inside the clipped block, below the inline-block's bottom edge. The clipped block sits inside the <span> (block-in-inline), so the baseline lookup goes through LineLayout::lastLineBaseline, which asked the block for its own last line. CSS Align says a block container that is a scroll container has its last baseline at its block-end margin edge. Apply that rule in the block-in-inline branch of LineLayout::lastLineBaseline, same as RenderBlock::lastLineBaseline does for block-level children. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/baseline-rules/overflow-hidden-block-in-inline-baseline{,-ref,-expected}.html: Added. * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::lastLineBaseline const): Canonical link: https://commits.webkit.org/324661@main
…widest item, not the sum of its lines https://bugs.webkit.org/show_bug.cgi?id=327945 <rdar://problem/190313974> Reviewed by Antti Koivisto. CSS Flexbox 9.9.2: a multi-line column container's max-content width is the sum of the cross sizes of the flex lines it gets under a cross-axis max-content constraint, plus the gaps. We used its widest item, as if the items stayed on a single line. FlexLayout::maximumContentSizeForMultilineColumn now runs flex steps 9.2 to 9.4 #8 with each item at its max-content width and sums the line cross sizes and gaps. It skips this when the items can't wrap and none is baseline-aligned; percentages resolve against zero, and the cached block sizes stay untouched. Items laid out this way are marked for layout, and so is the container, since grid and flex parents can ask a laid-out container again. Grid now lays out dirty baseline-aligned items before each track sizing pass, and css3/flexbox multiline tests expect the summed line widths. Tests: imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-baseline-001.html imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-calc-size-001.html imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-grid-item-001.html imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-percentage-001.html * LayoutTests/TestExpectations: * LayoutTests/css3/flexbox/multiline-justify-content.html: * LayoutTests/css3/flexbox/multiline.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/multiline-align-self-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flex-container-max-content-002.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/inline-flexbox-wrap-vertically-width-calculation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-005-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-019-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-baseline-001-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-baseline-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-calc-size-001-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-calc-size-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-grid-item-001-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-grid-item-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-percentage-001-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/intrinsic-size/col-wrap-percentage-001.html: Added. * Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp: (WebCore::FlexFormattingContext::layout): Report the line wraps to the Inspector here, so computing the intrinsic widths does not. (WebCore::FlexFormattingContext::maximumContentSizeForMultilineColumn): Added. (WebCore::FlexFormattingContext::computeFlexLines): (WebCore::FlexFormattingContext::crossSizeForFlexLines): (WebCore::FlexFormattingContext::performBaselineAlignment): (WebCore::FlexFormattingContext::flexItemCrossSizeIsDefinite): * Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.h: * Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp: (WebCore::FlexFormattingUtils::participatesInBaselineAlignment): Added. (WebCore::FlexFormattingUtils::participatesInBaselineAlignment const): Added. (WebCore::FlexFormattingUtils::maximumContentSizeNeedsFlexLines): Added. * Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.h: * Source/WebCore/layout/integration/flex/FlexIntegrationUtils.cpp: (WebCore::LayoutIntegration::FlexIntegrationUtils::computeBlockAxisContentSizeForFlexItem): (WebCore::LayoutIntegration::FlexIntegrationUtils::isComputingIntrinsicLogicalWidths const): Added. * Source/WebCore/layout/integration/flex/FlexIntegrationUtils.h: * Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp: (WebCore::LayoutIntegration::FlexLayout::computeIntrinsicLogicalWidths): (WebCore::LayoutIntegration::FlexLayout::intrinsicLogicalWidthsForFlexItem const): Added. (WebCore::LayoutIntegration::FlexLayout::FlexItemsAtMaxContentWidthScope::FlexItemsAtMaxContentWidthScope): Added. (WebCore::LayoutIntegration::FlexLayout::FlexItemsAtMaxContentWidthScope::~FlexItemsAtMaxContentWidthScope): Added. (WebCore::LayoutIntegration::FlexLayout::maximumContentSizeForMultilineColumn): Added. (WebCore::LayoutIntegration::FlexLayout::setFlexItemContentLogicalHeightFromLayout): (WebCore::LayoutIntegration::FlexLayout::computeIntrinsicLogicalWidths const): Deleted. * Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.h: * Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp: (WebCore::GridTrackSizingAlgorithm::setup): * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths const): Canonical link: https://commits.webkit.org/324662@main
main got #927 (d6e9f85) after the merge of 3ba7716. Two files conflict, and both conflicts are one repair that both sides made. A switch over a string that reads the characters of a substring in place took the width from the bit that the rope caches. Atomizing the base can put a 16-bit StringImpl in its place, so the width has to come from the base as it is now. - dfg/DFGSpeculativeJIT.cpp (emitSwitchStringOnString): the same line on both sides under two comments. Upstream's comment. - ftl/FTLLowerDFGToB3.cpp (the switch on a string): upstream b92d6a6 moved the read of a substring's base into substringRopeBaseImplAndOffset() and tests the base with isNot8BitStringImpl(). #927 tests the same flag in the code that upstream moved. Upstream's code. Both files are now the files of this branch before the merge: #927 changed nothing else in them. #927 adds JSTests/stress/switch-string-substring-of-base-widened-by-atomization.js for its repair. With the jsc of this branch before the merge (x64 lto-aot, bcd362b), which has upstream's code, the test passes in its 17 modes. With the jsc of main before #927 (fcc1ea0) it fails with "bad value: 0, expected 3" once the function is compiled. Five more files changed on both sides, and git merged them: JSTests/BUN-TEST-DIFFERENCES.md, interpreter/Interpreter.cpp, runtime/ArrayPrototypeInlines.h, runtime/VM.h and wtf/Assertions.h. No added line of #927 uses a name that upstream removed in this range. Its new tests name a runtime function by its name ($toLocaleString), not by a number, and the numbers of the engine's functions are the same with and without #927 (aot/builtins/generator/engine.ts on both trees). Not compiled before the push: the sources of #927 under aot/ against this branch. The lanes of CI do that.
…r a spread or a rest of a function WebKit e04a6f9 gave `{ ...fn }` and `let { ...rest } = fn` a fast path that reads only the Structure of the function. The generic copy looks every own key up, and that lookup makes `name` a property of the function. Bun's stack frames show that property in front of a displayName. Compiled code copies from a closure the generic way. With the fast path, plain code left `name` alone, and three programs of Bun's test/aot printed another frame compiled than plain (errors/stack-frames-... with a displayName). JSFunction::canPerformFastEnumerablePropertyEnumeration now answers false for every function in a build with ENABLE(AOT). It did so for compiled closures already. A build with ENABLE_AOT=0 keeps upstream's fast path.
This was referenced Oct 28, 2026
main is at f495db1 (#930). There is no conflict. Three files changed on both sides and merged by themselves: aot/builtins/engine-syntax.builtins.ts, runtime/VM.cpp and yarr/YarrJIT.cpp. #930 adds five tests that name a function of the engine by its number: find (35), flatIntoArrayWithCallback (41), flatMap (42), the next of the array iterator (69) and performIteration (73). Upstream 37aa2b5 deleted number 23, so each is one lower on this branch. 22 numbers change in codegen/prologue/a-loop-beside-rare-calls-takes-no-register-that-a-frame-saves.ir and in four files of valueflow/host/. #930 takes four ShadowRealm functions out of the list of numbered functions and moves no other number. aot/builtins/generator/engine.ts runs on the merged tree, and its list is the list of #930 without number 23.
main is at 8c6c963: #919 (simdutf base64), #936 (ICU 79.1) and #937 (the address space ballast is removed). Two files conflict, CLAUDE.md and JSTests/BUN-TEST-DIFFERENCES.md, in the count of upstream tests that the fork changes. The base says 124. This branch adds 2 (the Proxy revoke function, the RegExp legacy properties) and #936 adds 3 (the three Intl tests with CLDR 49's text), so it is 129. Three more files changed on both sides and merged by themselves: Dockerfile, heap/Heap.cpp and heap/Heap.h. No .ir test of the compiler changes in this range, and the list of numbered engine functions is the same.
robobun
added a commit
to oven-sh/bun
that referenced
this pull request
Oct 29, 2026
main has #47129, the Bun side of oven-sh/WebKit#927 and #930. The one conflict is WEBKIT_VERSION. It is now the preview build of oven-sh/WebKit#923 at 35b64c4a: the upstream merge, the fork's main up to f495db1d24 (what main pins) and the commit that keeps the generic copy for a spread of a function.
robobun
added a commit
to oven-sh/bun
that referenced
this pull request
Oct 29, 2026
main has #47281 and pins oven-sh/WebKit 8c6c963e3c (ICU 79.1, no address space ballast). The one conflict is WEBKIT_VERSION. It is now the preview build of oven-sh/WebKit#923 at b67a0b1a, which is the upstream merge on top of that same 8c6c963e3c.
robobun
added a commit
that referenced
this pull request
Oct 29, 2026
… fork's two RegExp modes The test came with upstream 191803b, the commit before this one. After a test() that matched, it expects the second match, the one that RegExp.lastMatch and the other legacy properties start for the captures, to run out of stack and throw a RangeError. That holds for the JIT code, where the match with captures takes more stack than the match without. With --validateRegExpFlatProgram=true (mode regexp-flat-program) and with --useRegExpImageMode=true (mode regexp-image-mode) the second match is made within --maxRegExpStackSize=65536. Nothing throws, and the test fails with "expected RangeError but got undefined". It skips those two modes. This is the change of 29c7e20 on #923, the upgrade to upstream e8f7048. The test and its row in JSTests/BUN-TEST-DIFFERENCES.md are the same as there, so the merge of that upgrade has nothing to do in them. The fork now changes 128 upstream tests. With a Release build of jsc for Linux x64 without the ahead-of-time compiler: the test as upstream wrote it passes in 17 modes and fails in regexp-flat-program. With this change the 17 modes pass and that mode is skipped.
robobun
added a commit
to oven-sh/bun
that referenced
this pull request
Oct 29, 2026
oven-sh/WebKit#923 is merged. Its merge commit has the same tree as the head that the preview build autobuild-preview-pr-923-b67a0b1a was made from, and that preview release goes away now that the pull request is merged.
sosukesuzuki
pushed a commit
to oven-sh/bun
that referenced
this pull request
Oct 30, 2026
Fixes #44697 ### Problem - Bun's JavaScriptCore is 360 upstream commits behind WebKit/WebKit@e8f704815e94. 59 touch JavaScriptCore, WTF or bmalloc. - `RegExp.lastMatch` after a `test()` that matched can end the process: `panic(main thread): Segmentation fault at address 0x4`. - Two results are wrong: `Math.sumPrecise([-1])` is `-1.0000000000000002`, and an async function that awaits itself through `Promise.all` repeats its frame in `Error.stack`. ### Fix - `WEBKIT_VERSION` is a7b59e61de2e, the merge commit of oven-sh/WebKit#923: the engine of `main` plus the upstream merge. - Upstream deleted one builtin: in `test/aot/engine-tests`, 2,648 builtin numbers are one lower and 19 instance offsets eight bytes lower. Loop bytecode changes, so `bundler_bytecode_portable.test.ts` has new snapshots. - **Two test bounds go up, which needs a maintainer's yes**: the `--trim` size in `compile-aot-size.test.ts` and the function count of one program (Notes). - Verified, local debug build: `test/js/bun/jsc/webkit-upgrade-e8f704815e.test.ts` (new, 17 cases, Bun 1.4.3-canary fails 4) and `test/js/bun/jsc/regexp-legacy-static-properties.test.ts` (new, the panic on Bun 1.4.3-canary). `test/aot/engine-tests` passes with a release `testaot`. ### Background - `WEBKIT_VERSION` (`scripts/build/deps/webkit.ts`) names the oven-sh/WebKit release whose JavaScriptCore the build downloads. - The ahead-of-time compiler numbers the engine's JavaScript builtins by name order, and the instance of a compiled program has one word per link-time constant. ### Downsides - Size: hello world with `--aot --trim` maps 167,808 bytes more. A compiled program that calls `Array.from` holds 22 functions, was 6. - A thread that breaks the collector's stop-the-world protocol now crashes a release build (Notes). - The own keys of the `Proxy.revocable` revoke function now start with `length` and `name`. <details><summary>Notes</summary> #### The WebKit side oven-sh/WebKit#923 merges upstream `e8f704815e94` into the fork. Its description lists the 16 conflicts and how each one is resolved. The first CI run of that pull request built every lane and published a preview release. Its test jobs failed for three reasons. None of them is in the libraries that Bun links: - Upstream now links its programs with `-z pack-relative-relocs` (WebKit/WebKit@c47b7c073c). The `jsc` and `testFFI` programs of the Linux lanes then need glibc 2.36. The arm64 test runner has glibc 2.35. - One new upstream test (`stress/regexp-legacy-static-properties-rematch-failure.js`) cannot pass in two test modes that only the fork has. - Upstream deleted one JavaScript builtin. The tests of the ahead-of-time compiler name builtins by number, and the numbers behind the deleted one moved. That pull request has a commit for each of them. After that, the fork's `main` got oven-sh/WebKit#914, #886 and #926, and Bun's `main` got the ahead-of-time compiler (#45631) with that WebKit (#47125). Both are merged in, over there and here. A review of the merged head found one defect of the merge itself: with the object loop of `JSON.parse` that upstream rewrote, `Bun.JSONL` could give an object a Structure that a collection had freed. `bcd362b31e` over there repairs it and adds a stress test. With the `jsc` of the build before it, that test ends in `SIGSEGV` in 6 runs of 6. The fork's `main` then moved three more times, and each time its Bun side had to be on Bun's `main` before this branch could pin a build with it: | oven-sh/WebKit `main` | Bun side | merged into oven-sh/WebKit#923 at | |---|---|---| | #927 | #47129 | `be93e08e36` | | #930 | #47129 | `35b64c4afb` | | #919, #936 (ICU 79.1), #937 | #47281 | `b67a0b1a3a` | - `780dc90982` over there turns upstream's fast path for `{ ...fn }` off in builds with the ahead-of-time compiler (see "What Bun's CI showed"). - oven-sh/WebKit#923 is merged as `a7b59e61de`, and `WEBKIT_VERSION` is that commit. It has the same tree as `b67a0b1a3a`, the head whose preview build (`autobuild-preview-pr-923-b67a0b1a`) this branch pinned before. That is `8c6c963e3c`, which `main` pins since #47281, plus the upstream merge. The CI of oven-sh/WebKit#923 was green at that head: 84 jobs, with `testFFI`, `TestWTF`, `testaot` and `run-javascriptcore-tests` on Linux x64 and arm64. - A build of this branch against an engine whose Bun side is not on `main` does not work. With the preview of `780dc90982` and `main` before #47129, the build stopped at `src/jsc/bindings/BunCompiledModules.cpp:756` (`too few arguments to function call`, `JSC::AOT::tryReservePagesForNewThread`), and with that call changed every `bun build --compile --aot` ended with `IdOutOfRange`. The release zip sizes of an earlier version of this description compared builds 133970 and 133646: between -0.15% and +0.12% over the 12 release zips (`bun-linux-x64.zip` -38,546 bytes). #### What Bun's CI showed The head is `e22cf6a525` now. On top of `3688162c4c` it has the pin of the merge commit, the test for #44697 and one corrected comment. The engine source is the same as in build 135015. **Build 135015** ran `3688162c4c`, the head with the answers below. 184 of its 188 jobs passed and none failed: every build, and every test job on Linux, Windows and macOS on ARM64. The four macOS x64 test jobs had not started when this was written. No agent of that queue was free, and three attempts of each job expired after an hour of waiting. Four tests failed once and passed on a retry or alone (`bun-serve-html.test.ts`, `no-leak-records-at-exit.test.ts`, `hot.test.ts`, `process-stdin.test.ts`). **Build 134977** ran the head before that, with `main` up to #47129 and the preview of `35b64c4afb`. Three things failed that do not pass on a retry. `3688162c4c` answers each: | Test | Failure | Answer | |---|---|---| | `test/aot/engine/ir-1`, `ir-3`, `ir-5`, `ir-6` (nine `.ir` files, Linux x64) | `lower-to-b3: output line 7 does not match: Int64 b@22 = Load(b@10, offset = 8264, ..); nearest: .. offset = 8256 ..` | The offsets are written anew (see "The engine tests") | | `test/aot/parallel/arrays/searches-folds-and-flat-maps-of-a-list-bring-in-only-the-functions-that-do-them.js` | `ImageFunctionsEmitted <= 40, but the build counted 42` | The bound is 48. **A maintainer has to agree** | | `test/bundler/compile-aot-size.test.ts` | hello world with `--trim` maps 25,777,292 bytes, and the bound is 25,700,000 | The bound is 25,880,000. **A maintainer has to agree** | Eight more tests failed and passed on a retry or alone (`plugin-requests-run-ahead.test.ts`, `no-leak-records-at-exit.test.ts`, `compile-aot-run-time.test.ts`, `43831.test.ts`, `filesink.test.ts`, `process-stdin.test.ts`, `body.test.ts`, `test-cluster-shared-leak.js`). **The function count.** The program calls `Array.from({ length: 16 })` and six array methods. Its executable holds 24 functions with the canary of `main` and 42 here. - Upstream's `Array.from` (WebKit/WebKit@37aa2b5bd94d) steps an iterator by a call of its `next` and closes it by a call of its `return`. The old text was a `for-of` loop. - One function of the library runs for every call of `Array.from`, so the compiler keeps what that call of `next` can reach by name. The 18 more functions are the two helpers `iteratorGenericNext` and `iteratorGenericClose`, one part of `Array.from` that is moved out of line, and the `next`, `return` and `throw` of array iterators, generators, iterator helpers and wrapped iterators. - A one-line `console.log(Array.from([1, 2, 3], x => x + 1).join())` holds 22 functions where `main` holds 6. Its bound is 24. - #47316 expands the two helpers in line in the front end (its engine half is oven-sh/WebKit#934). A release build of it keeps 25 functions for this program and 7 for the one-line program, so the bound of 40 holds again once that pull request is on `main`. The bound of 48 is needed only until then. **The size.** `test/bundler/compile-aot-size.test.ts`, Linux x64 with glibc. Build 135015 is the commit of the canary plus this upgrade: | hello world | canary of `main` (`081ace731d`) | build 135015 | bound | |---|---|---|---| | `--aot` | 68,138,180 | 68,305,988 | 68,440,000 | | `--aot --trim` | 25,584,836 | 25,752,644 | 25,700,000, now 25,880,000 | Both grow by 167,808 bytes. `.text` of `jsc` grows by 143,376 bytes with the 360 upstream commits. The test says that its bounds only go down, so this is a maintainer's call. The new bound has about the slack the old one had (127,356 bytes, it was 115,164). The comment beside it says 183,000 bytes, which was measured on an older commit of `main`. The next push corrects it to 168,000. **Earlier runs** (builds 134164 and 134232, before #47129, with the test names of that time) showed two more causes. Both are answered on the WebKit side: - A stack frame after `{ ...fn }`. Bun names a frame by the own property `name` of the callee first, and by `displayName` after it. A copy that looks every key up makes `name` a property of a function. Upstream WebKit/WebKit@e04a6f9faecf copies from a function by its Structure and leaves `name` alone, and the run time of compiled programs still looks the keys up. Three programs printed another frame compiled than plain. A maintainer chose to turn upstream's fast path off in builds with the ahead-of-time compiler (`780dc90982` of oven-sh/WebKit#923). With a local debug build of this branch, `errors/frames-functions-display-name-statement.js`, `errors/frames-functions-given-display-name-far.mjs` and `errors/names-frames-new-function-objects-names.mjs` print the same compiled and plain. The cost: `{ ...fn }` does not get upstream's speedup (160 ms against 50 ms on `JSTests/microbenchmarks/object-spread-function.js`). - `Array.from` in a compiled program held 441 functions. The flow analysis took the call of `next` inside the helper `iteratorGenericNext` for a call of a value nobody knows. oven-sh/WebKit#930 changed that rule, and 22 functions are left (above). Build 134164 also showed a crash under collector stress (`SIGSEGV` at address 0 in `WTF::findAtomBeforeAdding`). Its cause was on `main` too: `AOT::nameOfBuiltin()` makes an atom while a collection ends, where `Heap::pruneDeadReferences()` has set the atom table of the thread to null. #### The engine tests `test/aot/engine-tests` has the IR text tests of the engine that need entries of Bun's table of builtins (1,601 files since #47129). - A test names a builtin that is written in JavaScript by its runtime function number. Upstream WebKit/WebKit@37aa2b5bd94d deleted `defaultAsyncFromAsyncIteratorWithNext`, which was number 23. Every number from 24 on is one lower: 2,648 numbers in 371 files. `every` is 30 (was 31), `find` 34, `from` 46, `map` 64 and `some` 88. The numbers of Bun's own functions start at 0x10000 and do not move. No file names a number that the engine's list does not have. - The instance of a compiled program holds one word for every link-time constant of the engine, and the deleted builtin was one. Every field behind that list is eight bytes lower. Nine tests check the B3 of a function line by line and had such offsets in 19 lines (8040, 8168, 8192, 8216, 8264). `test/aot/tools/update-ir-tests.ts` wrote them anew with a release `testaot` on Linux x64, and nothing else in those files changed. - With a release `testaot` and `jsc` built from this branch, `testaot run test/aot/engine-tests` passes: 1,599 files, 2 todo. - oven-sh/WebKit#923 makes the same change of numbers in the engine's own tests. #### The new test file `test/js/bun/jsc/webkit-upgrade-e8f704815e.test.ts` has 17 cases. Four of them fail on Bun 1.4.3-canary, because the engine changes there: | Case | Old engine | New engine | |---|---|---| | `Math.sumPrecise([-1])` | `-1.0000000000000002` | `-1` | | Own keys of the revoke function of `Proxy.revocable`, after `length` is deleted and defined again, against those of an arrow function after the same steps | another order (`name`, `length`) | the same order (`length`, `name`) | | `Error.stack` of an async function that awaits its own promise through `Promise.all` | the frame repeats | one frame | | `[x, y].sort(boundComparator)` when the comparator leaves optimized code (the program of oven-sh/WebKit#885) | the caller gets `Array.prototype.sort` itself | the caller gets the sorted array | The other 13 cases pass on both engines. They cover the code that the merge rewrote by hand: spread and rest of a function, the iterator protocol of `Array.from`, `Object.groupBy`, `Map.groupBy` and the iterator helpers, `Array.fromAsync`, `Array.prototype.join`, `JSON.parse` of objects with the same keys (also `-0`, invalid input and a reviver), `Bun.JSONL.parseChunk` cut at every position, loops that end in a null test or a negated comparison, and an anchored RegExp and a `switch` on a substring. #### The bytecode snapshots `test/bundler/bundler_bytecode_portable.test.ts` compares a hash of the serialized bytecode. 22 entries come from a local debug build with the merged engine. The entry `bun build --bytecode libraries.js` comes from CI: the bundle of that entry differs on the machine the other values come from. All ten test platforms of build 133970 reported the same value for it, and accepted the other 22. #### Bun's CI on the first preview build Build 133970 ran this branch with `autobuild-preview-pr-923-b6e34894`. One test failed on every platform: the snapshot entry above, which had its old value then. Eight other tests failed and passed on a retry (`bake.test.ts`, `hot.test.ts`, `no-orphans.test.ts`, `spawn_waiter_thread.test.ts`, `test-zlib-invalid-input-memory.js`, `nth-anplusb-ident.test.ts`, `process.test.js`, `bun.test.ts`). The zip sizes in "The WebKit side" compare the release zips of that build with those of build 133646, which is `main` at the commit this branch started from. The range is over the 12 release zips. The unpacked binaries were not measured: the artifact store of CI is not reachable from the machine this was written on. #### The crash of #44697 `test()` records only where the match is. A read of `RegExp.lastMatch`, `RegExp.$1` or another legacy static property runs the match again for the captures. That second run can need more stack than the first, and when it failed, `RegExpGlobalData::getBackref` read through a null pointer. Upstream WebKit/WebKit@191803bb2304, which is in this range, throws a `RangeError` there. ```sh BUN_JSC_maxRegExpStackSize=65536 bun -e ' const re = new RegExp("^" + "(z)?".repeat(8) + "(?:a|b)+$"); console.log(re.test(Buffer.alloc(100000, "a").toString())); console.log(RegExp.lastMatch.length);' ``` - Bun 1.4.3-canary: `true`, then `panic(main thread): Segmentation fault at address 0x4`. - A debug build of this branch: `true`, then `RangeError: Out of memory`, also for `RegExp.$1`, `RegExp.$9`, `RegExp["$&"]` and `RegExp.lastParen`. `test/js/bun/jsc/regexp-legacy-static-properties.test.ts` runs the program of upstream's stress test in a child with `BUN_JSC_maxRegExpStackSize=65536` and compares every line that the child prints: `matched: true` for the first `test()`, a `RangeError` for each read and for an assignment to `RegExp.input`, and the values of the properties after the next match. `USE_SYSTEM_BUN=1 bun test` fails it with the panic, and `bun bd test` passes it. The test comes from #47160, which had the upstream commit alone (oven-sh/WebKit#929, closed now). #### What ran locally - With the pin of the merge commit, a debug build with ASAN: `webkit-upgrade-e8f704815e.test.ts` passes 17 of 17, and `regexp-legacy-static-properties.test.ts` passes. - `bun run build:local` against the merged WebKit (Debug, no ASAN). `-p '42'` prints `42`. - `test/js/bun/jsc`: 215 pass. Two `domjit.test.ts` cases pass their 20 s limit in this Debug build. The same two take 42 s on a debug build of `main`. - `test/js/bun/jsonl`, the worker tests, the GC tests and the heap snapshot tests pass. - `JSType.h`, `OptionsList.h`, the WebCore bindings scripts and the structured clone sources have no upstream change in this range. `src/jsc/JSType.rs` needs no change. #### The three assertion commits WebKit/WebKit@0bf94cf0c1, WebKit/WebKit@4bc9ad4d7f and WebKit/WebKit@cf89f1571e check the bits of `Heap::m_worldState` with `RELEASE_ASSERT`, in the functions through which a thread takes or gives up its access to the heap. Bun gives up heap access while the event loop waits (`Bun__JSC_onBeforeWait`) and takes it again after the wait. That order is the one the assertions check. #### Upstream changes Range: [`f59345e04a8d`](WebKit/WebKit@f59345e) (2026-10-22) .. [`e8f704815e94`](WebKit/WebKit@e8f7048) (2026-10-27). **59** of the 360 upstream commits touch `Source/JavaScriptCore`, `Source/WTF` or `Source/bmalloc`. 20 of the 59 change nothing that a JSCOnly build compiles: they touch a preferences yaml, a sandbox profile, the Xcode project, or code for Swift, GLib or Cocoa only. ### Highlights - **`JSON.parse` reads the keys it already knows in a loop of their own** ([`6f5f583b55`](WebKit/WebKit@6f5f583b55)). A key found in `JSONCache`'s name table, and a value that is a cached string or an integer of at most nine digits, are read through a local cursor. The lexer is only used for the other values. Upstream measures 1.13x on its JSON benchmarks (geometric mean), up to 1.32x. - **Object spread and rest of a function take the fast path** ([`e04a6f9fae`](WebKit/WebKit@e04a6f9fae)): `{ ...fn }` and `let { a, ...rest } = fn` are 5x faster. PostCSS does this once per `LazyResult`. - **`Array.from`, `%TypedArray%.from`, `Object.groupBy`, `Map.groupBy` and `Iterator.prototype.flatMap/some/every/find` drive the iterator themselves** ([`37aa2b5bd9`](WebKit/WebKit@37aa2b5bd9)). They no longer build a wrapper object for a `for-of` loop: 1.1x to 1.6x on the `Array.from` microbenchmarks. - **`Proxy.revocable` is 2.9x faster** ([`fad04e2527`](WebKit/WebKit@fad04e2527)). The revoke function is a `JSFunctionWithFields` with a cached executable, and the result object has a cached Structure. The class `ProxyRevoke` is gone. - **Loop conditions are one instruction more often** ([`bd50166362`](WebKit/WebKit@bd50166362)). A null test or a negated compare that feeds a backward conditional jump is fused into the jump (`jneq_null`, `jnless`, ...). No opcode is new, but the bytecode of most loops changes. - **The RegExp first-character filter reads substring ropes in place** ([`b92d6a6bea`](WebKit/WebKit@b92d6a6bea)), and `String#match` with a constant anchored RegExp uses the filter in the DFG. The same commit makes DFG/FTL `switch` on a substring rope read the width of the base string, not the bit cached in the rope. - **Two DFG/FTL and Wasm miscompile fixes**: an OSR exit in a bound `Array#sort` comparator returned past the `sort` call ([`f274ef4c03`](WebKit/WebKit@f274ef4c03)), and a cross-instance Wasm tail call copied its frame from one `restoreFrameSize` too low ([`0927910cf9`](WebKit/WebKit@0927910cf9)). - **The GC asserts its stop-the-world protocol in release builds** ([`0bf94cf0c1`](WebKit/WebKit@0bf94cf0c1), [`4bc9ad4d7f`](WebKit/WebKit@4bc9ad4d7f), [`cf89f1571e`](WebKit/WebKit@cf89f1571e)). A mutator that takes or gives up heap access in a state the protocol does not allow crashes now. - **`Math.sumPrecise` is correct for negative sums** ([`8ee560d748`](WebKit/WebKit@8ee560d748)): `Math.sumPrecise([-1])` was `-1.0000000000000002`. ### Runtime & builtins - [`e04a6f9fae`](WebKit/WebKit@e04a6f9fae) ([328286](https://bugs.webkit.org/show_bug.cgi?id=328286)): `@copyDataProperties` and `@cloneObject` accept a `JSFunction` source on the path that reads the Structure, through the new `JSFunction::canPerformFastEnumerablePropertyEnumeration(VM&)`. It needs an unmodified `name` and `length`, no accessors and no own `__proto__`. object-spread-function 4.99x, object-rest-function 5.54x. - [`37aa2b5bd9`](WebKit/WebKit@37aa2b5bd9) ([328563](https://bugs.webkit.org/show_bug.cgi?id=328563)): Five builtin files call `@iteratorGenericNext` in a `for (;;)` loop and close the iterator with `@ifAbruptCloseIterator`. The link-time constant `defaultAsyncFromAsyncIteratorWithNext` is removed, and `defaultAsyncFromAsyncIterator` has its body now. - [`fad04e2527`](WebKit/WebKit@fad04e2527) ([328635](https://bugs.webkit.org/show_bug.cgi?id=328635)): `Proxy.revocable`: see Highlights. Removed: `ProxyRevoke.{h,cpp}`, `ProxyRevokeInlines.h`, `proxyRevokeSpace`, `JSGlobalObject::proxyRevokeStructure()`. Added: `proxyRevocableResultStructure()`, `VM::proxyRevokeExecutable()`, `JSFunctionWithFields::Field::RevocableProxy`, the identifiers `proxy` and `revoke`. Observable: the own keys of the revoke function list `length` and `name` first, like any function. - [`e81441a5ec`](WebKit/WebKit@e81441a5ec) ([328769](https://bugs.webkit.org/show_bug.cgi?id=328769)): `JSOnlyStringsAndInt32sJoiner` is renamed `JSExactLengthJoiner`. `Array#join` keeps its exact-length path for arrays that also hold booleans, `undefined` or `null`. - [`8ee560d748`](WebKit/WebKit@8ee560d748) ([315450](https://bugs.webkit.org/show_bug.cgi?id=315450)): `WTF::Xsum::XsumSmall::compute()` rounded a negative sum away from zero when it must not. `Math.sumPrecise([-Number.MAX_VALUE])` was `-Infinity`. - [`071ce01fcb`](WebKit/WebKit@071ce01fcb) ([328147](https://bugs.webkit.org/show_bug.cgi?id=328147)): `Interpreter::getAsyncStackTrace` stops at the second visit of a promise combinator. An async function that awaits its own promise through `Promise.all` no longer repeats its frame up to `Error.stackTraceLimit`, or hangs. - [`be583048f3`](WebKit/WebKit@be583048f3) ([328788](https://bugs.webkit.org/show_bug.cgi?id=328788)): `Identifier::add` no longer does one atomic ref and one deref of the `AtomStringImpl` it returns. - [`ca48e0119c`](WebKit/WebKit@ca48e0119c) ([328786](https://bugs.webkit.org/show_bug.cgi?id=328786)): The last two `USE(BIGINT32)` blocks are deleted. Dead code. ### Parser / bytecode generator - [`bd50166362`](WebKit/WebKit@bd50166362) ([328623](https://bugs.webkit.org/show_bug.cgi?id=328623)): `emitJumpIfTrue` and `emitJumpIfFalse` no longer require a forward target for their fusions. `while (node != null)` and `do {} while (!(a < b))` end in one fused jump. The subject names only the null tests. The diff also covers the ten negated compares. - [`4e5e850636`](WebKit/WebKit@4e5e850636) ([328770](https://bugs.webkit.org/show_bug.cgi?id=328770)): `BytecodeGeneratorBase<Traits>` is folded into `BytecodeGenerator`. `GenericLabel` and `GenericBoundLabel` are the plain classes `Label` and `BoundLabel`, and `Label::bind` takes the instruction writer. `BytecodeGeneratorBase.h` is deleted and `BytecodeGeneratorBaseInlines.h` is renamed `BytecodeGeneratorInlines.h`. `BytecodeList.rb` loses the unused type `:WasmBoundLabel`, and no opcode. ### DFG / FTL - [`f274ef4c03`](WebKit/WebKit@f274ef4c03) ([327983](https://bugs.webkit.org/show_bug.cgi?id=327983)): An inlined bound function keeps the call kind of its caller. `InlineCallFrame::BoundFunctionCall` and `BoundFunctionTailCall` are removed. A bound comparator inlined into `Array#sort` is an `ArraySortComparatorCall`, so an OSR exit inside it restarts the `sort`. A recursive tail call through a bound function can become a jump in the FTL. - [`b92d6a6bea`](WebKit/WebKit@b92d6a6bea) ([328389](https://bugs.webkit.org/show_bug.cgi?id=328389)): See Highlights. `compileRegExpMatchFast` (DFG) returns `null` without a call when the first byte cannot start a match. ### RegExp - [`59e81f3e12`](WebKit/WebKit@59e81f3e12) ([328828](https://bugs.webkit.org/show_bug.cgi?id=328828)): A match array gets `index`, `input`, `groups` and `indices` written into its butterfly before the array cell exists. `tryCreateUninitializedRegExpMatchesArray` has a fifth parameter, and `JSArray::tryCreateUninitializedRestrictedButterfly` is new. - [`1984003fd9`](WebKit/WebKit@1984003fd9) ([328895](https://bugs.webkit.org/show_bug.cgi?id=328895)): On x86_64 the Yarr JIT copies fewer than 16 `ParenContext` frame slots with straight-line code, and eight per loop iteration above that. regexp-parencontext-frame-slots 1.80x. - [`191803bb23`](WebKit/WebKit@191803bb23) ([328417](https://bugs.webkit.org/show_bug.cgi?id=328417)): `RegExp.lastMatch`, `RegExp.$1` and the other legacy properties throw a `RangeError` when the lazy re-match fails. Before, they read a null array. ### JSON - [`6f5f583b55`](WebKit/WebKit@6f5f583b55) ([328615](https://bugs.webkit.org/show_bug.cgi?id=328615)): See Highlights. The object branch of `LiteralParser::parseRecursively` is one loop with the lambdas `parseValue`, `putWithTransition` and `finishObject`. `Lexer::skipWhitespaceBeforeKey()` is removed, `Lexer::setPtr()` and `end()` are new, and `numberOfDigitsForSafeInt32` moves to `ParseInt.h`. - [`2dff3f1dbf`](WebKit/WebKit@2dff3f1dbf) ([329046](https://bugs.webkit.org/show_bug.cgi?id=329046)): Compile fix for the commit above with clang 20: three lambdas capture `vm` by name. ### GC / heap - [`0bf94cf0c1`](WebKit/WebKit@0bf94cf0c1) ([328987](https://bugs.webkit.org/show_bug.cgi?id=328987)): `Heap::stopTheMutator` asserts that no mutator holds the conn, where it had a branch that returned false. - [`4bc9ad4d7f`](WebKit/WebKit@4bc9ad4d7f) ([329005](https://bugs.webkit.org/show_bug.cgi?id=329005)): `Heap::resumeTheMutator` asserts that the mutator is stopped, has no heap access and no conn. It returned early when the mutator was not stopped. - [`cf89f1571e`](WebKit/WebKit@cf89f1571e) ([329038](https://bugs.webkit.org/show_bug.cgi?id=329038)): Release asserts on `Heap::m_worldState` in `acquireAccessSlow`, `releaseAccessSlow`, `setNeedCollectionEpilogue`, `setMutatorWaiting`, `clearMutatorWaiting`, `Collector::beginCollectionInEachHeap`, `finishChangingPhase` and `stopThePeriphery`. `Collector::requestCollection` gets two debug asserts. `Heap::needCollectionEpilogue()` is new. ### WebAssembly - [`0927910cf9`](WebKit/WebKit@0927910cf9) ([329002](https://bugs.webkit.org/show_bug.cgi?id=329002)): `Wasm::emitRestoreInstanceFrameIfNeeded` starts its copy at the stack pointer from before the adjustment. ### WTF - [`45f193ae80`](WebKit/WebKit@45f193ae80) ([328940](https://bugs.webkit.org/show_bug.cgi?id=328940)): `Thread::tryCreate()` returns null when the thread cannot be created. `Thread::create()` calls it and still crashes. `$.agent.start` in the `jsc` shell throws. - [`e8f704815e`](WebKit/WebKit@e8f704815e) ([329066](https://bugs.webkit.org/show_bug.cgi?id=329066)): The defaults of `LOG_DISABLED`, `ASSERT_MSG_DISABLED`, `ASSERT_ARG_DISABLED`, `BACKTRACE_DISABLED`, `FATAL_DISABLED` and `ERROR_DISABLED` move from `Assertions.h` to `PlatformEnable.h`. - [`bbfbc41dc9`](WebKit/WebKit@bbfbc41dc9) ([327419](https://bugs.webkit.org/show_bug.cgi?id=327419)): The `RELEASE_LOG*` macros are defined once, on top of a `WTF_RELEASE_LOG_SEND` per backend. `LOGF`, `SD_JOURNAL_SEND` and `LOG_ANDROID_SEND` are removed. - [`3757158274`](WebKit/WebKit@3757158274) ([328861](https://bugs.webkit.org/show_bug.cgi?id=328861)): `allowCompactPointers<T>()` looks at the `AllowCompactPointers<T*>` specialization first. `WTF_ALLOW_COMPACT_POINTERS_TO_INCOMPLETE_TYPE(JSC::JSCell)` moves from `MicrotaskQueue.h` to `JSCJSValue.h`. - [`2b85a5e547`](WebKit/WebKit@2b85a5e547) ([328859](https://bugs.webkit.org/show_bug.cgi?id=328859)): `printInternal(PrintStream&, String&)` is defined in `PrintStream.cpp`, not inline. - [`38418ba096`](WebKit/WebKit@38418ba096) ([328643](https://bugs.webkit.org/show_bug.cgi?id=328643)): `NeverDestroyed` and `LazyNeverDestroyed` read their storage through `std::launder`. - [`701620c269`](WebKit/WebKit@701620c269) ([328791](https://bugs.webkit.org/show_bug.cgi?id=328791)): `Vector::appendRange(Range&&)` for a sized range. The rest of the commit is WebCore. - [`272972fe8c`](WebKit/WebKit@272972fe8c) ([328652](https://bugs.webkit.org/show_bug.cgi?id=328652)): `WTF::initializeObjectIdentifierDomain()`. Only WebKit's GPU process calls it. - Fixes in headers that nothing in JavaScriptCore uses: [`961981e9e8`](WebKit/WebKit@961981e9e8) (`MediaTime` ordering), [`2c813011e9`](WebKit/WebKit@2c813011e9) (`WeakListHashSet` const iterator), [`3e90cc907c`](WebKit/WebKit@3e90cc907c) (`LoggingHashMap`), [`474bb3fa62`](WebKit/WebKit@474bb3fa62) (`BitSet::setEachNthBit` asserts `n`). ### bmalloc / libpas Bun's JavaScriptCore allocates through mimalloc, and the ASAN builds through the system allocator, so none of these changes what a shipped `bun` does. - [`c8ce68fbaa`](WebKit/WebKit@c8ce68fbaa) ([328247](https://bugs.webkit.org/show_bug.cgi?id=328247)): Each page config of a heap has its own minimum of objects per page. `PAS_MIN_OBJECTS_PER_PAGE` is renamed `PAS_DEFAULT_MIN_OBJECTS_PER_PAGE`, and `PAS_MAX_OBJECT_SIZE` takes the minimum as an argument. - [`37e9021372`](WebKit/WebKit@37e9021372) ([328674](https://bugs.webkit.org/show_bug.cgi?id=328674)): Medium segregated pages take objects up to 18432 bytes (from 11776). - [`ad3ad2c6ea`](WebKit/WebKit@ad3ad2c6ea) ([328277](https://bugs.webkit.org/show_bug.cgi?id=328277)): Free small segregated pages stay committed 450 ms longer (900 ms on macOS). - [`1ae8574624`](WebKit/WebKit@1ae8574624) ([328282](https://bugs.webkit.org/show_bug.cgi?id=328282)): Four more size classes in the designated intrinsic heap: 112, 144, 272 and 384 bytes. ### Build system - [`9c5e8c5fc1`](WebKit/WebKit@9c5e8c5fc1) ([328481](https://bugs.webkit.org/show_bug.cgi?id=328481)): CMake Debug builds compile bmalloc and `FastMalloc.cpp` with `-O3`, except with MSVC and clang-cl. - [`3c41f3fb2f`](WebKit/WebKit@3c41f3fb2f) ([329015](https://bugs.webkit.org/show_bug.cgi?id=329015)): Symbols that only offlineasm output references get `REFERENCED_FROM_ASM`, for GCC LTO. ### Nothing for a JSCOnly build (20) `2fe794df22`, `a46f812bfd`, `0ae4c9d112`, `da8e478d08`, `1d91ff5512`, `ac53330cbd`, `319a9b6c84`, `8655634bf3`, `e381818e3a`, `280384b995`, `933708cada`, `3b48f12459`, `17d262face`, `4e2a07134b`, `d71f3d702b`, `500be61de4`, `ad490a9bef`, `58ebe7bde3`, `8bd119f86f`, `48fd938fe4`: web preferences, sandbox profiles, the Xcode project, Swift bridging, GLib and GTK/WPE build files. </details> <!-- robobun:evidence:begin --> --- **no test proof** · iteration 7 · platform-specific test(s) that do not run on this machine, deferring to CI, which covers all platforms: test/bundler/compile-aot-size.test.ts, test/bundler/bundler_bytecode_portable.test.ts <!-- robobun:evidence:end -->
This was referenced Nov 2, 2026
Shay12tg
pushed a commit
to Shay12tg/WebKit
that referenced
this pull request
Nov 24, 2026
…41aca8 616 upstream commits since e8f7048 (the previous upgrade, oven-sh#923), 105 of them in Source/JavaScriptCore, Source/WTF or Source/bmalloc. This records upstream/main as a parent, so the next upgrade finds its base by itself as long as this lands as a merge commit and not as a squash. 35 files conflicted. JSType.h, OptionsList.h, .github/workflows, .github/scripts, the Dockerfiles and the structured clone sources are untouched. BytecodeList.rb gains op_call_varargs_with_spread, its return location, its trampoline and three CLoop return labels (c3b920b), so the opcode numbers after them move. The WebCore bindings generator changes in one way: the finalize() of a wrapper owner returns FinalizeResult. WeakHandleOwner::finalize() returns FinalizeResult (5edecbf) - RegExpCache.cpp: upstream's return type on the fork's NEVER_INLINE finalize(). - WeakBlock.h, WeakImpl.h: the fork's quoted includes, and the includes that upstream adds. unpoisonCellsAwaitingFinalizers() stays. - WeakSetInlines.h: upstream's file. - Tools/TestWebKitAPI/CMakeLists.txt: both lists of tests. Merged without a conflict and changed for the fork: - WeakBlock.cpp: sweep() reads a snapshot of the WeakImpl before it calls the finalizer. The fork's ASAN unpoison of the cell, for a compiled image, is in that loop now. unpoisonCellsAwaitingFinalizers() reads m_deadCountUpperBound, the new name of m_deadCount. - VM.cpp: HostFunctionExecutables::finalize() returns KeepImpl. WTF::Atomics takes the memory order as a template argument (6ab0aeb) - Atomics.h: upstream's functions are for a libc++ that has std::atomic_ref. The fork's fallbacks for one that has none (Android NDK) are written again on the new API, through Atomic<T>. The fork's AtomicRef is unchanged. fenceAfterReadModifyWriteIfNecessary() asserts std::atomic<T>::is_always_lock_free in the fallback. - 20 files that upstream does not have or did not change call the old API (atomicLoad(p, order), exchangeOr(v, order), load(order), store(v, order)). They call the new one, with the same orders: 17 under aot/, FastMarkAppender.h, CachedTypes.cpp and UnlinkedFunctionExecutable.h. The microtask dispatcher tail-calls one function per job (9fadb87) - Microtask.h: upstream's JSC_FOR_EACH_INTERNAL_MICROTASK list. The fork's jobs are in it through three more lists, at the places they had, so every InternalMicrotask keeps its number: JSC_FOR_EACH_COMPILED_ASYNC_FUNCTION_INTERNAL_MICROTASK (after AsyncFunctionResume), JSC_FOR_EACH_COMPILED_MODULE_INTERNAL_MICROTASK (after AsyncModuleExecutionDone) and JSC_FOR_EACH_BUN_INTERNAL_MICROTASK (after Opaque). 54 jobs. - JSMicrotask.cpp: upstream's run<Name>() functions and dispatcher. With USE(BUN_JSC_ADDITIONS) every job takes the fourth argument, which is the async context. What the fork had in the cases of the old switch is in the jobs: AsyncContextSwapScope, the compiled-body tail calls of ENABLE(AOT), the result promise of PromiseFinallyReactionJob, the bare step of AsyncGeneratorDriverResume, CyclicModuleRecord in AsyncModuleExecutionDone. The fork's own jobs are run<Name>() functions too. The dispatcher leaves with MUST_TAIL_CALL, and with a real musttail for clang on Windows with ENABLE(AOT), as before. Heap world state (d39ac42, d0f5aa9, 76ec268) - Heap.cpp: upstream's stopIfNecessarySlow() and waitForCollector(). The fork's changes are applied to them again: the two asserts on hasAccessBit and stoppedBit stay off, the branch for a compiled image that collects in the mutator stays, and so do collectInMutatorThreadUntilDone(), parkWhileWorldStateIs() and tryEnsureThreadForWork(). Upstream's new assert that no epilogue is pending only holds for a caller with heap access. It has that condition here, as the fork lets a caller in without access. Proxy handler trap cache, and [[Set]] through a forwarding proxy (23777f3) - ProxyObject.h, ProxyObject.cpp: upstream's cache, one byte per trap, for every trap. The fork's entry for a field of a compiled handler is in the same byte: field * 2 + foundNothingWhileEmpty, for fields below 127. forwardsOwnPropertyDefinitionToTarget() is false for a compiled handler, as its traps are not all in the Structure. The fork's Dispatch helper stays. emptyHandlerTrapCache is gone. - JSObject.cpp: upstream's definePropertyOnReceiver(), which looks through such proxies, and then the fork's AOT::RuntimeHooks::targetThatProxyDefinesOn() and its check of immutable properties. definePropertyOnReceiverSlow() takes the original receiver. - CommonIdentifiers.h has deleteProperty, for the cache. The fork's Reflect.deleteProperty is native, so there was no public name for it. Object.freeze() and Object.seal() change indexed properties in bulk (7e80df5) - ObjectConstructor.cpp: upstream's fast paths take arrays now. They do not take an object with immutable properties. Object.freeze() of an array leaves it to the fork's tryFreezeArrayInPlace() when the VM keeps dense arrays dense. Object.isSealed() has the same immutable-properties condition as Object.isFrozen(). JSON.parse (609fc1c, 5eb574b) - JSONCache.h, JSONCacheInlines.h: upstream's packed StringEntry and its table of long strings. The fork's flag that the text of a short entry is ASCII is one more bit of the key. A source that is UTF-8 only takes an ASCII short entry, and never a long one, which would be matched against the bytes of the source. findString() is back as the lookup of a short entry, for aot/runtime/AOTJSONScanner.h. tryMakeJSString() can fail, as in the fork. - LiteralParser.h, LiteralParser.cpp: upstream's code, with the fork's Lexer::mayHaveCachedString(), CachedCharType spans, UTF-8 strings and out-of-memory path. - MarkedVector.h, MarkedVector.cpp: the fork's append(), and upstream's check that the value needs marking in the fork's appendAsRequest(). The other conflicts - WasmOMGIRGenerator.cpp (311da45): upstream's switch of instance inside the patchpoint of a non-tail indirect call. The fork's callee-frame CodeBlock slot is stored there, and code for an image cages the memory base with a scratch register of its own. - InPlaceInterpreter64.asm, LLIntThunks.h (1d4bed4): upstream's gates for ARM64E. RETURN_ADDRESS_SIGNING signs the two return addresses as before, in an elsif of its own. - MacroAssemblerX86_64.cpp (22dc398): the fork's collectCPUFeatures() with upstream's read of CPUID leaf 7 and its Rosetta path. - Structure.h (d5af1b7): both, hasNonReifiedStaticProperty() and the immutable-properties functions. - GCAwareJITStubRoutine.cpp (afbd43f): both checks. - FTLLowerDFGToB3.cpp, DFGSpeculativeJIT64.cpp (410ce8d) and DFGIntegerRangeOptimizationPhase.cpp (41a3299): upstream fixed what the fork had fixed. Upstream's code. - MemoryFootprint.h, PlatformJSCOnly.cmake (b3ef667): upstream's header, and upstream's ARC flag before the fork's ANDROID branch. - URL.h, URLParser.h, URLParser.cpp, AtomStringImpl.cpp (b96dec3): NODELETE on the functions that the fork still has. - shell/CMakeLists.txt (06185f1, 4cc9921): ENABLE_JAVASCRIPTCORE_TOOLS in place of APPLE, around the fork's sources for mya. Other changes for the fork - DFGDoesGCCheck.h: nodeOpBits is 10. The merged tree has 513 DFG node types. Verified - Every file that the fork had not changed is identical to upstream's. Every file that upstream had not changed is identical to the fork's, but for the 20 files of the Atomics API, VM.cpp, DFGDoesGCCheck.h and AOTJSONScanner.h. - A Debug build with ASAN of the jsc target on Linux x64, in bun's build graph (clang 23, ENABLE(AOT) on), compiles and links. With it 1,017 stress tests pass in their default mode: the 53 that upstream added under JSTests/stress and JSTests/wasm/stress in this range, and the tests around the code above (promises, async functions and generators, modules, Proxy, Reflect.set, JSON, freeze and seal, weak references, spread and varargs, the bun-* tests, wasm indirect calls and tail calls). Three tests that give the shell less than 300 KB of stack do not start in this configuration.
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.
Problem
JSON.parse,BytecodeGeneratorBaseandThread::create().Fix
e8f704815e94. Land this as a merge commit, not a squash. The next upgrade finds its base from the upstream parent.DT_RELRin the glibc lanes, 208 renumbered builtins in AOT tests, two skipped modes for a new RegExp test, aJSONCache::ParsingScopeforBun.JSONL, no fast path for{ ...fn }in AOT builds.mainis merged in up to [JSC] AOT: remove the address space ballast #937 (conflicts in Notes).Background
{ ...fn }reads only the Structure. The generic copy makesnamean own property, which Bun's stack frames print before adisplayName. Compiled code copies the generic way.DT_RELRis a compact table of relative relocations. glibc reads it from 2.36, the lanes target 2.31.JSONCacheonly inside aParsingScope. Upstream's newJSON.parseloop relies on that.Downsides
testaot(heap-cage/) runs the mutator-thread collection of [JSC] AOT: short loops written out, B3 and Air printed for tests, one Structure for an object that is filled, facts on environment fields #914 under those assertions.{ ...fn }: 160 ms against 50 ms (object-spread-function.js, x64lto-aot)..textofjscgrows by 0.4% (+143,376 bytes, x64lto-aot, before [JSC] AOT: short loops written out, B3 and Air printed for tests, one Structure for an object that is filled, facts on environment fields #914).Notes
After the first CI run
The first run (head
b6e34894) built every lane and published the preview release. All six test jobs failed. Each cause below is reproduced with the lane tarballs of that run.The second run (head
877c88a861, the four commits) is green: 84 jobs pass, and the six test jobs with them.testFFI,TestWTFandrun-javascriptcore-testspass on x64 and arm64 in thelto,lto-aotandlto-hardened-aotlanes.1. The arm64 programs did not start (commit
1d76548c67).testFFI,TestWTFand every run ofjscended with status 1.-z pack-relative-relocswhen the linker can do it. The programs of this run haveDT_RELRand need the versionGLIBC_ABI_DT_RELR. The ones ofmainhave neither.qemu-aarch64with the root file system of Ubuntu 22.04 (glibc 2.35),jscof this run printsversion `GLIBC_ABI_DT_RELR' not foundand exits with 1.jscofmainprints42. With the root of Debian 12 (glibc 2.36) both run, andtestFFIof this run passes its 1,509,952 checks.GLIBC_<number>, which isGLIBC_2.29in both. The new line of the check fails onjscof this run and passes onjscofmain(both tried here withllvm-readelf23).jscof its arm64ltolane has noDT_RELR, needs noGLIBC_ABI_*version and prints42under the Ubuntu 22.04 root.jscchanges too, but it still loads on API 28: the relative relocations keepDT_ANDROID_RELR, and the other relocations are plainDT_RELA(16 KB) where they were Android's packed format.2.
testaot: 42 failing tests (commitd23596bd1d).testaot allon x64lto-aotmain(191c6a4)b6e34894877c88a861AOTBuiltinIDs.hof the two releases differ in one entry:arrayConstructorDefaultAsyncFromAsyncIteratorWithNextCode, number 23, is gone. The 68 entries behind it are each one lower.builtin-result-objects/steps-of-array-iteratorandsteps-of-generator. Their program text is compiled intotestaot(AOTBuiltinResultObjectTests.cpp). A local Debug build oftestaotwith the new numbers passes both.every,map,nextand 16 more names) has the number of that builtin in the new list. A script compared them.3. One stress test, in the fork's RegExp modes (commit
29c7e20114).run-javascriptcore-tests, as the test job calls it, withjscof the x64ltolane: 126,310 runs, one failure,stress/regexp-legacy-static-properties-rematch-failure.js.regexp-flat-program.jscof the x64lto-aotlane the test also fails with--useRegExpImageMode=true.jscoflto-aot: every test withregexin its name, from all collections, and the four tests that need the compiler. 7,586 runs pass, 473 of them inregexp-image-mode.4. One flow test of the compiler (commit
877c88a861).valueflow/results/accessor-laid-on-an-object-that-has-escaped-is-an-indirect-call-with-all-flow-rules-delayed.irno longer gets the lineindirect f0 S5 -> f1 Accessor Once.testing=mainDelayFlowRulesDelayOtherFlowRulestestaotof this pull request gives the same column under qemu.aot/valueflow.ValueFlowSolver::letSomeDueStatementsWait()picks the statements that wait by a hash of the seed, the statement and the round. The statements have other numbers now.f2.main. The test has no variant forDelayOtherFlowRulesalone. I added aTODOline and did not change the solver. [JSC] AOT: short loops written out, B3 and Air printed for tests, one Structure for an object that is filled, facts on environment fields #914 has the repair since, and the merge ofmainbelow removes the line again.Sizes.
jscofmainbefore #914 (191c6a4138) againstjscof the second run. x64lto-aot: the file goes from 60,951,112 to 61,100,792 bytes,.textfrom 37,530,547 to 37,673,923. arm64lto: the file goes from 56,603,544 to 56,731,056 bytes,.textfrom 33,549,248 to 33,682,752.Observable changes for a program. The own keys of the revoke function of
Proxy.revocablestart withlengthandname.Math.sumPreciseis exact for negative sums. The bytecode of loops changes (WebKit/WebKit@bd5016636210), so Bun's bytecode snapshots change. oven-sh/bun#47112 has the tests.After #914 landed on
mainmainmoved tofcc1ea0973(#914) while this pull request was open. Commit0e1036638fmerges it in.Dockerfileis the one conflict: both sides added a check behind the check of the glibc floor. Both checks are kept.CMakeLists.txt,Sources.txt,heap/Collector.cpp,heap/Heap.{cpp,h},interpreter/Interpreter.cpp,jsc.cpp,runtime/VM.{cpp,h},yarr/YarrJIT.cpp,aot/builtins/AOTBuiltinArrayOperations.cppandJSTests/BUN-TEST-DIFFERENCES.md. Every other file of the result is the file of the one side that changed it. A script compared all 479,572 paths.codegen/collections-and-built-ins/array-for-each-with-an-arrow.irandarray-reduce-with-an-arrow.irare new in [JSC] AOT: short loops written out, B3 and Air printed for tests, one Structure for an object that is filled, facts on environment fields #914 and name runtime functions 44 and 82. They are 43 and 81 here. No other file of [JSC] AOT: short loops written out, B3 and Air printed for tests, one Structure for an object that is filled, facts on environment fields #914 names an engine function above 23.TODOline of item 4 is gone. With the solver of [JSC] AOT: short loops written out, B3 and Air printed for tests, one Structure for an object that is filled, facts on environment fields #914 the test passes on this branch with both switches.Heap::releaseAccessSlow(),relinquishConn()andwaitForCollector()now have both the new code of [JSC] AOT: short loops written out, B3 and Air printed for tests, one Structure for an object that is filled, facts on environment fields #914 (a collection on the mutator's thread when no thread can be made for the collector) and upstream's new assertions onm_worldState. I read the merged functions: the new path runs while the mutator has heap access and the conn, which is what the assertions of a mutator that conducts require. The test of that path istestaot(heap-cage/), in the release lanes.jscandtestaotcompile and link.stress/bun-aot-builtins-table.jsfinds no mismatch. The flow test and the two renumbered tests pass. 313 of 315 stress tests of the earlier selection pass: one needs the options of itsrunDefaultline, which my runner does not pass, and one ran out of time while another job used the machine.heap-cage/tests oftestaot. They run a process under a limit on address space, and a Debug program does not fit in it. With the releasetestaotofmainthey pass on the same machine.After #886 and #926 landed on
main, and the review of0e1036638fThe second merge of
main(commit3ba7716cf1).mainmoved to23d7f1dcef(#886, #926).yarr/YarrJIT.cppand git merged it: upstream WebKit/WebKit@1984003fd9e5 changes how the frame slots of aParenContextare copied, and [JSC] Do not apply maximumRegExpJITCodeSize to an inlined RegExp#test #886 changeshasExceededCodeSizeLimit()and adds an assertion behind the backtracking code. [YARR] The interpreter backtracks a greedy backreference by what it took #926 changesyarr/YarrInterpreter.cpp, which upstream did not change in this range.run-javascriptcore-tests --filter="regex|regexp|yarr", 7278 runs from all collections, no failure. The tests that [JSC] Do not apply maximumRegExpJITCodeSize to an inlined RegExp#test #886 and [YARR] The interpreter backtracks a greedy backreference by what it took #926 add are among them.Bun.JSONLand a freed Structure (commitbcd362b31e). The review of0e1036638ffound it.LiteralParser::parseRecursively()takes the transition of a key thatJSONCacheknows as aStructureID. When the property needs out-of-line storage, the allocation can collect. The conservative scan does not see aStructureID, so the new Structure lives only whenJSONCachemarks it. It does that inside aJSONCache::ParsingScope.parseRecursivelyEntry()(JSON.parse) opens the scope. The JSON parser of compiled programs has one as a member.tryStreamingParse()(Bun.JSONL) had none. The code from before the merge held aStructure*there and needed none.tryStreamingParse()now opens the scope for the whole call. Upstream's loop is unchanged.JSTests/stress/bun-streaming-json-parse-keeps-cached-transitions-alive.js, with--slowPathAllocsBetweenGCs=1.jsclto-aot,877c88a861and0e1036638fSIGSEGVinparseRecursively()undertryStreamingParse(), 12 runs of 12JSONCache::m_isParsingset by a debugger for the time oftryStreamingParse()lto-aot,main(fcc1ea0973)lto,877c88a861and0e1036638fltolane has no ahead-of-time compiler. Its code leaves the pointer to the new Structure where the conservative scan finds it, so it does not crash without the fix. The-aotlanes are what Bun links.tryStreamingParse(). A collection during a streaming parse visits the 704 entries of the cache and keeps them, as it does duringJSON.parse.run-javascriptcore-tests --filter="json|JSON|bun-streaming", 1376 runs, no failure. I did not build the-aotconfiguration with the fix locally. The test jobs of the-aotlanes run the new test.After #927 landed on
mainmainmoved tod6e9f85e67(#927). Commitbe93e08e36merges it in.dfg/DFGSpeculativeJIT.cppandftl/FTLLowerDFGToB3.cpp. Both conflicts are one repair that both sides made. Aswitchover a string that reads the characters of a substring in place took the width from the bit that the rope caches. Atomizing the base can put a 16-bitStringImplin its place, so the width has to come from the base as it is now. Upstream WebKit/WebKit@b92d6a6beae6 made the repair when it moved that code intosubstringRopeBaseImplAndOffset(). [JSC] AOT: counted loops that can be interrupted, vector loops over typed arrays, number fields past 32 bits, records that passes keep true #927 made it in the code that upstream moved.stress/switch-string-substring-of-base-widened-by-atomization.jsfor its repair. With thejscofbcd362b31e(x64lto-aot), which has upstream's code, the test passes in its 17 modes. With thejscofmainbefore [JSC] AOT: counted loops that can be interrupted, vector loops over typed arrays, number fields past 32 bits, records that passes keep true #927 (fcc1ea0973) it fails withbad value: 0, expected 3once the function is compiled.JSTests/BUN-TEST-DIFFERENCES.md,interpreter/Interpreter.cpp,runtime/ArrayPrototypeInlines.h,runtime/VM.handwtf/Assertions.h.aot/against this branch. The lanes of CI do that.After Bun's tests of the ahead-of-time compiler ran
oven-sh/bun#47112 ran Bun's
test/aotagainst the preview build ofbcd362b31e. Commit780dc90982answers one of the causes it found.A stack frame after
{ ...fn }. Three programs printed another frame compiled than plain:errors/stack-frames-of-functions-with-a-display-name-once-a-statement-has-looked-for-the-name,errors/stack-frames-of-functions-given-a-display-name-far-from-where-they-are-writtenanderrors/stack-frames-of-new-function-objects-whose-names-were-read-before-the-objects-changed. Every line that differs is the frame of a function with adisplayName, after a spread of that function.nameof the callee first, and bydisplayNameafter it (functionName()insrc/jsc/bindings/ErrorStackTrace.cppof Bun).@copyDataPropertiesasksgetOwnPropertySlot()for every own key. For aJSFunctionthat makes the lazynamea property. The fast path of WebKit/WebKit@e04a6f9faecf walks the Structure and leavesnamelazy.aot/runtime/AOTObjectCopyOperations.cpp). So with the merge, plain code printedat displayedwhere compiled code printed the function's own name.JSFunction::canPerformFastEnumerablePropertyEnumeration()answers false for every function underENABLE(AOT). Before, it answered false for a compiled closure only. A build withENABLE_AOT=0keeps upstream's fast path.maindoes: thereStructure::canPerformFastPropertyEnumerationCommon()refuses aJSFunction, because it overridesgetOwnPropertySlot.namelazy too, or Bun's frames have to stop depending on it.Checks with the builds of
780dc90982:stress/object-spread-and-rest-function-source.jspasses with the x64lto-aotjscin five modes (default,--useJIT=0,--useDFGJIT=0,--useFTLJIT=0, and with the tier-up thresholds at 10 and 20).main(canary11c367163). With a debug Bun on the build ofbcd362b31ethey differ frommainin exactly the lines that Bun's CI reported.main". Bun'smaincannot compile a program for an engine that has [JSC] AOT: counted loops that can be interrupted, vector loops over typed arrays, number fields past 32 bits, records that passes keep true #927 (IdOutOfRangewhen the engine reads the program), and does not build against it (BunCompiledModules.cpp:756,tryReservePagesForNewThreadtakes an argument now). The Bun side of [JSC] AOT: counted loops that can be interrupted, vector loops over typed arrays, number fields past 32 bits, records that passes keep true #927 and [JSC] AOT: flow follows Proxy and the library helpers; typed JSON.parse; the main module #930 is AOT: fixes for modules, classes and Workers, WebKit upgrade, shorter compiler docs bun#47129.The cost, with the x64
lto-aotjscofbe93e08e36(fast path on for plain functions) and of780dc90982. Each number is the median time of the benchmark's loop over 21 runs, the two programs run in turn:JSTests/microbenchmarksobject-spread-function.jsobject-rest-function.jsArray.fromin a compiled program. Not changed here. With upstream's new text (WebKit/WebKit@37aa2b5bd94d) a compiledconsole.log(Array.from([1, 2, 3], x => x + 1).join())holds 441 functions. With the text ofmainit holds 6.Array.fromwith operands nobody knows. The new text readsiterator.nextonce and hands it to the linked functioniteratorGenericNext(aot/builtins/handwritten/IteratorOperations.ts). Inside that function the callee is a parameter, sokeyOfMemberCalledOnItsHolder()does not see a member called on its holder, andValueFlowRuleContext::group()raisesValueNobodyKnowsIsCalled.valueflow-why timelineshows it. With the text ofmainthe only flag isObjectNobodyKnowsIsWritten. With the new textValueNobodyKnowsIsCalledfollows,by CalliniteratorGenericNext, and thenUnknownCodeWrites.for-of, which isIteratorOpenandIteratorResumein the IR. They raise no flag.mainhas the same cost today where a built-in already uses that function:[1, 2, 3].values().map(x => x + 1).toArray()holds 449 functions with Bun's canary, and.some(..)(afor-ofonmain) holds 21.valueflow/host/linked-function-that-only-the-code-behind-described-built-ins-calls-is-such-code-too.ir, which expects noValueNobodyKnowsIsCalledbehind such a linked function. It coversiteratorGenericNextunderArray.from: with [JSC] AOT: flow follows Proxy and the library helpers; typed JSON.parse; the main module #930 merged in, the program above holds 22 functions. See "After [JSC] AOT: flow follows Proxy and the library helpers; typed JSON.parse; the main module #930 landed onmain".After #930 landed on
mainmainmoved tof495db1d24(#930). Commit35b64c4afbmerges it in.aot/builtins/engine-syntax.builtins.ts,runtime/VM.cppandyarr/YarrJIT.cpp.codegen/prologue/a-loop-beside-rare-calls-takes-no-register-that-a-frame-saves.irand four files ofvalueflow/host/. 22 numbers are one lower here:findis 34,flatIntoArrayWithCallback40,flatMap41, thenextof the array iterator 68 andperformIteration72.aot/builtins/generator/engine.tsruns on the merged tree. Its list is the list of [JSC] AOT: flow follows Proxy and the library helpers; typed JSON.parse; the main module #930 without number 23.35b64c4afb: 84 jobs pass, with the six test jobs.Checks with the Bun side of #930, which is oven-sh/bun#47129 (at
6e63b62277, not merged yet). A debug build of that branch against the preview build of35b64c4afb, Linux x64:console.log(Array.from([1, 2, 3], x => x + 1).join()), by--explain=statistics. The last two rows are debug builds:ImageFunctionsEmittedmainbefore #927 (fcc1ea0973)mainbcd362b31e)mainwith #930 (f495db1d24)35b64c4afb)Array.from(JSON.parse(..))holds 21 functions,[1, 2, 3].values().map(..).toArray()21,%TypedArray%.from20 andMap.groupBy21.Iterator.prototype.mapheld 449 with the canary ofmain.{ ...fn }(in that branch:errors/frames-functions-display-name-statement.js, its-no-flowform,errors/frames-functions-given-display-name-far.mjsanderrors/names-frames-new-function-objects-names.mjs) print the same compiled and as plain code.test/aot/engine-testsof that branch, 1601 files) withtestaotof that build: 1599 pass and 2 are todo, once 2648 function numbers in 371 files are one lower. That is the change the Bun side needs when it takes this upgrade.After #919, #936 and #937 landed on
mainmainmoved to8c6c963e3c: #919 (simdutf base64), #936 (ICU 79.1) and #937 (the address space ballast is removed). Commitb67a0b1a3amerges it in.CLAUDE.mdandJSTests/BUN-TEST-DIFFERENCES.md, in one number each: the count of upstream tests that the fork changes. The base says 124. This branch adds 2 (the Proxy revoke function, the RegExp legacy properties) and Bump bundled ICU to 79.1 #936 adds 3 (the three Intl tests with CLDR 49's text). It is 129 now.Dockerfile,heap/Heap.cppandheap/Heap.h. InHeap.cppthe change of [JSC] AOT: remove the address space ballast #937 is in the fork's own code (tryUseReserveOfExhaustedCage(), the epilogue). Nothing in the tree names the ballast any more..irtest of the compiler changes in this range. The list thataot/builtins/generator/engine.tswrites for the merged tree is the list of35b64c4afb, byte for byte.b67a0b1a3a: 84 jobs pass, with the six test jobs.mainpins8c6c963e3csince Remove the address space ballast and the mimalloc patches, upgrade mimalloc to v3.6.0 and ICU to 79.1 bun#47281. So the preview build ofb67a0b1a3ais that engine plus this upgrade, and Upgrade WebKit to e8f704815e94 bun#47112 pins it.What needs a careful look
The GC world state (WebKit/WebKit@0bf94cf0c1c1, WebKit/WebKit@4bc9ad4d7fb4, WebKit/WebKit@cf89f1571e48). New release asserts on
Heap::m_worldState:stopTheMutator(): no mutator holds the conn.resumeTheMutator(): the mutator is stopped, has no heap access, does not hold the conn and does not wait. Before, it returned early when the mutator was not stopped.acquireAccessSlow(): the conn bit and the waiting bit are clear.releaseAccessSlow(): the waiting bit is clear.setNeedCollectionEpilogue(): the bit is not set yet, and the mutator is stopped or conducts.setMutatorWaiting(),clearMutatorWaiting(): the mutator has heap access and is not stopped.Collector::beginCollectionInEachHeap(),finishChangingPhase()andstopThePeriphery().finishChangingPhase()no longer runs a pending epilogue when a mutator conducts into a stopped phase. It asserts that there is none.They merged without a conflict. The fork differs from upstream in this protocol in two ways. The asserts on heap access are commented out in both
stopIfNecessarySlow()and inhandleNeedCollectionEpilogue(unsigned).stopIfNecessarySlow(unsigned)andwaitForCollector()have a condition onOptions::runsCompiledImage(). The call sites of every function in the list are the same in the fork and upstream.Bun gives up heap access before its event loop waits and takes it back after (
Bun__JSC_onBeforeWait,Bun__JSC_acquireHeapAccessAfterWait). Read against the new asserts:releaseAccess()runs afterstopIfNecessary(), on the thread that holds access, andreleaseAccessSlow()clears the conn bit with the access bit. The collector thread then stops a mutator that has no access, sets the epilogue bit in End and resumes it. The nextacquireAccess()finds neither the conn bit nor the waiting bit. Before another collection begins, the collector thread waits inwaitWhileNeedCollectionEpilogue(). I found no path that breaks an assert, and none fired in the Bun tests listed below. Bun's CI on its ASAN lane (assertions on) and on the release lanes is the wider check.testaotcovers therunsCompiledImage()mode.Object spread and rest of a function (WebKit/WebKit@e04a6f9faecf).
canPerformFastPropertyEnumerationForCopyDataProperties()asksJSFunction::canPerformFastEnumerablePropertyEnumeration()for everyJSFunction, andCompiledClosureTypeis in the range ofJSFunction.AOT::Closure::getOwnSpecialPropertyNames()callsprepareForGenericAccess()andStaticFields::ensureProperties()before the base class lists anything. The new path would read the Structure without them, so{ ...CompiledClass }would miss static fields. The merge made the function return false for a compiled closure. Since780dc90982it returns false for every function underENABLE(AOT): see "After Bun's tests of the ahead-of-time compiler ran".JSON.parse(WebKit/WebKit@6f5f583b55ec). The object branch ofLiteralParser::parseRecursivelyis upstream's. The fork's changes that were inside the old code are on the new code:if (!entry || (Lexer::isUTF8 && !entry->textIsASCII)) break;and the same condition, withLexer::mayHaveCachedString(cursor, end), on the cached string value. The loop has a cursor of its own, somayHaveCachedString()got an overload that takes the position.parseValue():tryMakeJSString()and its null check, and the two conditions on the cached string.VM::mayHaveUncacheableTransitions()in the generic key lookup. The entries of the name table are only made after that check, as before.Bun.JSONL(tryStreamingParse) tells "needs more data" from "wrong" byLexer::isAtEnd(). I read the new loop for a text that ends after a known key, inside a short integer and after a cached string: the lexer gets the position back and stops at the end in each case. A test for every cut position is in the Bun pull request.Thread::tryCreate()(WebKit/WebKit@45f193ae800d). Upstream added the function the fork already had underENABLE(AOT). WithENABLE(AOT)the merged code is the fork's. Without it, it is upstream's. The shared body fails the same way in both: it drops the context's extra ref and returns null.The other conflicts
BytecodeGenerator.{h,cpp},BytecodeGeneratorBase.h,Label.h(WebKit/WebKit@4e5e85063690),JSStringJoiner.cpp(WebKit/WebKit@e81441a5ec9c),ArrayConstructor.js(WebKit/WebKit@37aa2b5bd94d),CMakeLists.txt,VM.cpp,ProxyRevoke.h(WebKit/WebKit@fad04e2527d8),YarrJIT.cpp(WebKit/WebKit@1984003fd9e5),PlatformEnable.h(WebKit/WebKit@e8f704815e94), andRenderSVGResourceFEImage.h, a new upstream file that git took for a rename of the deletedProxyRevoke.h. The commit message says what each one became.Three fork files changed because upstream removed or renamed what they use:
bytecode/BytecodeOptimizer.cpp(BytecodeGeneratorInlines.h,op_debug),aot/builtins/AOTBuiltinArrayOperations.cpp(JSExactLengthJoiner) andaot/builtins/engine-syntax.builtins.ts(defaultAsyncFromAsyncIteratorWithNextis gone). The generator of the table of built-ins named the last one when CMake configured.What was checked before the first CI run
main's, but for the three files above,JSTests/BUN-TEST-DIFFERENCES.mdandCLAUDE.md(the count of changed tests).JSType.h,OptionsList.h,.github/workflows,.github/scripts, the Dockerfiles, the WebCore bindings scripts and the structured clone sources are untouched.BytecodeList.rbloses the unused typeWasmBoundLabeland no opcode.BytecodeGeneratorBase,GenericLabel,GenericBoundLabel,JSGeneratorTraits,ProxyRevoke,proxyRevokeStructure,JSOnlyStringsAndInt32sJoiner,defaultAsyncFromAsyncIteratorWithNext,InlineCallFrame::BoundFunctionCall,BoundFunctionTailCall,skipWhitespaceBeforeKey,LOGF,SD_JOURNAL_SEND,PAS_MIN_OBJECTS_PER_PAGEorPAS_MAX_OBJECT_SIZE.jsctarget, Debug, Linux x64, clang 23, JSCOnly with Bun's options, without ASAN. It compiles and links.jsc, default mode: the 19 stress tests that upstream added or changed in this range,stress/bun-aot-builtins-table.js(no mismatch between the table of built-ins and the engine), and the stress tests whose names start withjson,array-from,array-join,object-spread,object-rest,iterator-helpers-,bound-function,array-sort-inline,spread-,loop-,switch-string,regexp-match,bun-and a few more. 308 files, all pass.Malloc=1. Without it, a Debug build without ASAN stops at startup on an assertion of mimalloc (arena.c:1379,_mi_is_aligned(start, MI_ARENA_SLICE_SIZE), called fromStructureMemoryManager). The merge does not change that code.stress/proxy-revocable-result-and-revoke-function.jsfails on this build at its line 53, on the text ofrevoke.toString()only. That is A2 ofJSTests/BUN-TEST-DIFFERENCES.md.9b8347a24e), Debug without ASAN, built against this branch as its local WebKit: it compiles, links and runs.test/js/bun/jsonl,test/js/bun/gc,test/js/web/workers/worker.test.ts, the two heap snapshot tests anderror-gc-test.test.jspass (392 tests). Intest/js/bun/jsc215 tests pass and 3 fail. Two aredomjit.test.tscases that pass their limit of 20 s in a Debug build. They take 42 s with the Debug build of an older engine. The third is the page fault count ofheapStats-mimalloc.test.ts(191 for each request, limit 20). That test is skipped with ASAN, and Bun's CI has no Debug lane without ASAN. I did not compare it with a Debug build ofmain.bundler_bytecode_portable.test.tsof Bun: "encoder output does not depend on the encoding process" passes. The snapshot of the serialized bytecode changes, as expected.Related
DFGByteCodeParser.cpp. The program in its description printsobject false -5,2147483647with this branch'sjsc.Upstream changes in this range
Range:
f59345e04a8d(2026-10-22) ..e8f704815e94(2026-10-27). 59 of the 360 upstream commits touchSource/JavaScriptCore,Source/WTForSource/bmalloc. 20 of the 59 change nothing that a JSCOnly build compiles: they touch a preferences yaml, a sandbox profile, the Xcode project, or code for Swift, GLib or Cocoa only.Highlights
JSON.parsereads the keys it already knows in a loop of their own (6f5f583b55). A key found inJSONCache's name table, and a value that is a cached string or an integer of at most nine digits, are read through a local cursor. The lexer is only used for the other values. Upstream measures 1.13x on its JSON benchmarks (geometric mean), up to 1.32x.e04a6f9fae):{ ...fn }andlet { a, ...rest } = fnare 5x faster. PostCSS does this once perLazyResult. This fork turns the path off in builds with the ahead-of-time compiler (commit780dc90982).Array.from,%TypedArray%.from,Object.groupBy,Map.groupByandIterator.prototype.flatMap/some/every/finddrive the iterator themselves (37aa2b5bd9). They no longer build a wrapper object for afor-ofloop: 1.1x to 1.6x on theArray.frommicrobenchmarks.Proxy.revocableis 2.9x faster (fad04e2527). The revoke function is aJSFunctionWithFieldswith a cached executable, and the result object has a cached Structure. The classProxyRevokeis gone.bd50166362). A null test or a negated compare that feeds a backward conditional jump is fused into the jump (jneq_null,jnless, ...). No opcode is new, but the bytecode of most loops changes.b92d6a6bea), andString#matchwith a constant anchored RegExp uses the filter in the DFG. The same commit makes DFG/FTLswitchon a substring rope read the width of the base string, not the bit cached in the rope.Array#sortcomparator returned past thesortcall (f274ef4c03), and a cross-instance Wasm tail call copied its frame from onerestoreFrameSizetoo low (0927910cf9).0bf94cf0c1,4bc9ad4d7f,cf89f1571e). A mutator that takes or gives up heap access in a state the protocol does not allow crashes now.Math.sumPreciseis correct for negative sums (8ee560d748):Math.sumPrecise([-1])was-1.0000000000000002.Runtime & builtins
e04a6f9fae(328286):@copyDataPropertiesand@cloneObjectaccept aJSFunctionsource on the path that reads the Structure, through the newJSFunction::canPerformFastEnumerablePropertyEnumeration(VM&). It needs an unmodifiednameandlength, no accessors and no own__proto__. object-spread-function 4.99x, object-rest-function 5.54x.37aa2b5bd9(328563): Five builtin files call@iteratorGenericNextin afor (;;)loop and close the iterator with@ifAbruptCloseIterator. The link-time constantdefaultAsyncFromAsyncIteratorWithNextis removed, anddefaultAsyncFromAsyncIteratorhas its body now.fad04e2527(328635):Proxy.revocable: see Highlights. Removed:ProxyRevoke.{h,cpp},ProxyRevokeInlines.h,proxyRevokeSpace,JSGlobalObject::proxyRevokeStructure(). Added:proxyRevocableResultStructure(),VM::proxyRevokeExecutable(),JSFunctionWithFields::Field::RevocableProxy, the identifiersproxyandrevoke. Observable: the own keys of the revoke function listlengthandnamefirst, like any function.e81441a5ec(328769):JSOnlyStringsAndInt32sJoineris renamedJSExactLengthJoiner.Array#joinkeeps its exact-length path for arrays that also hold booleans,undefinedornull.8ee560d748(315450):WTF::Xsum::XsumSmall::compute()rounded a negative sum away from zero when it must not.Math.sumPrecise([-Number.MAX_VALUE])was-Infinity.071ce01fcb(328147):Interpreter::getAsyncStackTracestops at the second visit of a promise combinator. An async function that awaits its own promise throughPromise.allno longer repeats its frame up toError.stackTraceLimit, or hangs.be583048f3(328788):Identifier::addno longer does one atomic ref and one deref of theAtomStringImplit returns.ca48e0119c(328786): The last twoUSE(BIGINT32)blocks are deleted. Dead code.Parser / bytecode generator
bd50166362(328623):emitJumpIfTrueandemitJumpIfFalseno longer require a forward target for their fusions.while (node != null)anddo {} while (!(a < b))end in one fused jump. The subject names only the null tests. The diff also covers the ten negated compares.4e5e850636(328770):BytecodeGeneratorBase<Traits>is folded intoBytecodeGenerator.GenericLabelandGenericBoundLabelare the plain classesLabelandBoundLabel, andLabel::bindtakes the instruction writer.BytecodeGeneratorBase.his deleted andBytecodeGeneratorBaseInlines.his renamedBytecodeGeneratorInlines.h.BytecodeList.rbloses the unused type:WasmBoundLabel, and no opcode.DFG / FTL
f274ef4c03(327983): An inlined bound function keeps the call kind of its caller.InlineCallFrame::BoundFunctionCallandBoundFunctionTailCallare removed. A bound comparator inlined intoArray#sortis anArraySortComparatorCall, so an OSR exit inside it restarts thesort. A recursive tail call through a bound function can become a jump in the FTL.b92d6a6bea(328389): See Highlights.compileRegExpMatchFast(DFG) returnsnullwithout a call when the first byte cannot start a match.RegExp
59e81f3e12(328828): A match array getsindex,input,groupsandindiceswritten into its butterfly before the array cell exists.tryCreateUninitializedRegExpMatchesArrayhas a fifth parameter, andJSArray::tryCreateUninitializedRestrictedButterflyis new.1984003fd9(328895): On x86_64 the Yarr JIT copies fewer than 16ParenContextframe slots with straight-line code, and eight per loop iteration above that. regexp-parencontext-frame-slots 1.80x.191803bb23(328417):RegExp.lastMatch,RegExp.$1and the other legacy properties throw aRangeErrorwhen the lazy re-match fails. Before, they read a null array.JSON
6f5f583b55(328615): See Highlights. The object branch ofLiteralParser::parseRecursivelyis one loop with the lambdasparseValue,putWithTransitionandfinishObject.Lexer::skipWhitespaceBeforeKey()is removed,Lexer::setPtr()andend()are new, andnumberOfDigitsForSafeInt32moves toParseInt.h.2dff3f1dbf(329046): Compile fix for the commit above with clang 20: three lambdas capturevmby name.GC / heap
0bf94cf0c1(328987):Heap::stopTheMutatorasserts that no mutator holds the conn, where it had a branch that returned false.4bc9ad4d7f(329005):Heap::resumeTheMutatorasserts that the mutator is stopped, has no heap access and no conn. It returned early when the mutator was not stopped.cf89f1571e(329038): Release asserts onHeap::m_worldStateinacquireAccessSlow,releaseAccessSlow,setNeedCollectionEpilogue,setMutatorWaiting,clearMutatorWaiting,Collector::beginCollectionInEachHeap,finishChangingPhaseandstopThePeriphery.Collector::requestCollectiongets two debug asserts.Heap::needCollectionEpilogue()is new.WebAssembly
0927910cf9(329002):Wasm::emitRestoreInstanceFrameIfNeededstarts its copy at the stack pointer from before the adjustment.WTF
45f193ae80(328940):Thread::tryCreate()returns null when the thread cannot be created.Thread::create()calls it and still crashes.$.agent.startin thejscshell throws.e8f704815e(329066): The defaults ofLOG_DISABLED,ASSERT_MSG_DISABLED,ASSERT_ARG_DISABLED,BACKTRACE_DISABLED,FATAL_DISABLEDandERROR_DISABLEDmove fromAssertions.htoPlatformEnable.h.bbfbc41dc9(327419): TheRELEASE_LOG*macros are defined once, on top of aWTF_RELEASE_LOG_SENDper backend.LOGF,SD_JOURNAL_SENDandLOG_ANDROID_SENDare removed.3757158274(328861):allowCompactPointers<T>()looks at theAllowCompactPointers<T*>specialization first.WTF_ALLOW_COMPACT_POINTERS_TO_INCOMPLETE_TYPE(JSC::JSCell)moves fromMicrotaskQueue.htoJSCJSValue.h.2b85a5e547(328859):printInternal(PrintStream&, String&)is defined inPrintStream.cpp, not inline.38418ba096(328643):NeverDestroyedandLazyNeverDestroyedread their storage throughstd::launder.701620c269(328791):Vector::appendRange(Range&&)for a sized range. The rest of the commit is WebCore.272972fe8c(328652):WTF::initializeObjectIdentifierDomain(). Only WebKit's GPU process calls it.961981e9e8(MediaTimeordering),2c813011e9(WeakListHashSetconst iterator),3e90cc907c(LoggingHashMap),474bb3fa62(BitSet::setEachNthBitassertsn).bmalloc / libpas
Bun's JavaScriptCore allocates through mimalloc, and the ASAN builds through the system allocator, so none of these changes what a shipped
bundoes.c8ce68fbaa(328247): Each page config of a heap has its own minimum of objects per page.PAS_MIN_OBJECTS_PER_PAGEis renamedPAS_DEFAULT_MIN_OBJECTS_PER_PAGE, andPAS_MAX_OBJECT_SIZEtakes the minimum as an argument.37e9021372(328674): Medium segregated pages take objects up to 18432 bytes (from 11776).ad3ad2c6ea(328277): Free small segregated pages stay committed 450 ms longer (900 ms on macOS).1ae8574624(328282): Four more size classes in the designated intrinsic heap: 112, 144, 272 and 384 bytes.Build system
9c5e8c5fc1(328481): CMake Debug builds compile bmalloc andFastMalloc.cppwith-O3, except with MSVC and clang-cl.3c41f3fb2f(329015): Symbols that only offlineasm output references getREFERENCED_FROM_ASM, for GCC LTO.Nothing for a JSCOnly build (20)
2fe794df22,a46f812bfd,0ae4c9d112,da8e478d08,1d91ff5512,ac53330cbd,319a9b6c84,8655634bf3,e381818e3a,280384b995,933708cada,3b48f12459,17d262face,4e2a07134b,d71f3d702b,500be61de4,ad490a9bef,58ebe7bde3,8bd119f86f,48fd938fe4: web preferences, sandbox profiles, the Xcode project, Swift bridging, GLib and GTK/WPE build files.