Upgrade to upstream WebKit 6b879687ee - #528
Conversation
https://bugs.webkit.org/show_bug.cgi?id=322413 rdar://problem/185702304 Reviewed by Tim Nguyen. Upstream commit: web-platform-tests/wpt@fa5393b Canonical link: https://commits.webkit.org/319760@main
…ement that's missing meaningful text context https://bugs.webkit.org/show_bug.cgi?id=322436 rdar://184783170 Reviewed by Abrar Rahman Protyasha and Megan Gardner. Improve both text-search-based targeting and summary strings for targeted elements with little-to-no accessible attributes or other context: 1. When targeting based on text, we currently require the search text to be present in the rendered DOM of the targeted element. However, in the case where the agent is trying to target a button or link that's a sibling of target text, this can cause confusing failures (from the perspective of the agent), since the target element doesn't (literally) contain the search text. Mitigate this by relaxing the constraints around text search, so that if we don't find search text underneath the target container, we fall back to searching the nearest non-inline ancestor of the target element for the search text. 2. Instead of surfacing an interaction description like: > Click on span with classes “sprite-fm-mono icon-arrow-right expand” ...in the case where a targeted element has no text, we should pull text context from rendered text siblings within the same block-level container, such that the interaction description can look something more like: > Click on span with classes “sprite-fm-mono icon-arrow-right expand” before rendered text “Security” Test: TextExtractionTests.InteractionDescriptionAndSearchTextForLabellessIcons Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm * Source/WebCore/page/text-extraction/TextExtraction.cpp: (WebCore::TextExtraction::nearestNonInlineAncestor): (WebCore::TextExtraction::searchForInteractionTargetText): (WebCore::TextExtraction::resolveMouseTarget): (WebCore::TextExtraction::adjacentRenderedTextLabel): (WebCore::TextExtraction::adjacentRenderedTextLabelDescription): (WebCore::TextExtraction::hasNoRenderedTextOrLabeledChild): (WebCore::TextExtraction::textDescription): (WebCore::TextExtraction::precedingRenderedTextLabel): Deleted. * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm: (TestWebKitAPI::TEST(TextExtractionTests, InteractionDescriptionAndSearchTextForLabellessIcons)): Canonical link: https://commits.webkit.org/319761@main
…de build https://bugs.webkit.org/show_bug.cgi?id=322378 Reviewed by Richard Robinson. The TestWebKitAPILibrary target has no fileSystemSynchronizedGroups entry, so the synchronized Tests folder contributes nothing to it by default and its membershipExceptions list is an opt-in list of the files compiled directly. Everything else reaches the target through the UnifiedSourceN bundles generated from Sources.txt and SourcesCocoa.txt, which means a file marked @no-unify has to appear in membershipExceptions or it is not compiled at all. 310630@main dropped WebKit/WKWebView/MediaLoading.mm and WebKit/WKWebView/WKAttachmentTests.mm from that list, so 41 WKAttachmentTests, 11 WKAttachmentTestsMac and 5 MediaLoading tests have silently not been built or run in the Xcode build since. Add them back. Only the Xcode build was affected; the CMake ports read Sources*.txt directly and handle @no-unify themselves. All 57 tests pass with the files restored. * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/319762@main
https://bugs.webkit.org/show_bug.cgi?id=322447 rdar://problem/185731047 Reviewed by Alan Baradlay. GridLayout::layout() ran the grid item placement algorithm inline, alongside track sizing, grid item layout, and alignment. Give placement its own class so that step 1 of the layout algorithm reads as a single call and GridLayout is left with only the steps that size and position items. GridItemPlacer takes the implicit grid rather than building it, so constructing the initial grid stays the responsibility of ImplicitGrid itself via a new createInitialGrid() factory. calculateInitialImplicitGridDimensions() moved there as a file-static helper since it needs no member access, which keeps GridDimensions out of every header. Placement only reads the unplaced items -- it writes into the ImplicitGrid -- so placeItems() and GridLayout::layout() now take a const UnplacedGridItems&. That lets computeIntrinsicWidths() drop the per-scenario clone of the unplaced items, which was a deep copy of three Vectors per intrinsic width scenario. Its comment claimed the placement and sizing algorithm consumed them, but nothing ever mutated them: every ImplicitGrid entry point already took them by const reference, and the grid cells, grid areas and PlacedGridItems built downstream all store copies. The clone was not isolating anything, so dropping it leaves the min-content and max-content scenarios as independent as they already were. No change in behavior. * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp: (WebCore::Layout::GridFormattingContext::computeIntrinsicWidths): * Source/WebCore/layout/formattingContexts/grid/GridItemPlacer.cpp: Added. (WebCore::Layout::GridItemPlacer::GridItemPlacer): (WebCore::Layout::GridItemPlacer::placeItems const): * Source/WebCore/layout/formattingContexts/grid/GridItemPlacer.h: Added. * Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp: (WebCore::Layout::GridLayout::layout): (WebCore::Layout::GridLayout::calculateInitialImplicitGridDimensions): Deleted. (WebCore::Layout::GridLayout::constructInitialImplicitGrid): Deleted. (WebCore::Layout::GridLayout::placeGridItems): Deleted. * Source/WebCore/layout/formattingContexts/grid/GridLayout.h: * Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.cpp: (WebCore::Layout::calculateInitialImplicitGridDimensions): (WebCore::Layout::ImplicitGrid::createInitialGrid): * Source/WebCore/layout/formattingContexts/grid/ImplicitGrid.h: Canonical link: https://commits.webkit.org/319763@main
… task ends https://bugs.webkit.org/show_bug.cgi?id=322451 rdar://185735562 Reviewed by Yijia Huang. Heap::runTaskInParallel() publishes a bonus task, runs it on the collector visitor (collector thread), then clears it. And both setting and clearing a bonus task (for parallel visitors) notify m_markingConditionVariable. While publishing a bonus task requires broadcasting notification, clearing does not need it since it just reduces a possible task. Also, we do not need to notify m_markingConditionVariable when clearing a bonus task in drainFromShared too. We add m_bonusVisitorTaskConditionVariable to signal it to the collector thread. * Source/JavaScriptCore/heap/Heap.cpp: (JSC::Heap::clearConcurrentRetainedDataIfPossible): * Source/JavaScriptCore/heap/Heap.h: * Source/JavaScriptCore/heap/SlotVisitor.cpp: (JSC::SlotVisitor::drainFromShared): Canonical link: https://commits.webkit.org/319764@main
https://bugs.webkit.org/show_bug.cgi?id=322383 rdar://185665260 Reviewed by Chris Dumez. Two spots on the Cache API lookup path copied a URL only to throw the copy away. DOMCacheEngine::matchURLs() copied both the request URL and the cached record URL into locals before comparing them, but the copies only exist so that setQuery({ }) can strip the query strings when CacheQueryOptions::ignoreSearch is set. When ignoreSearch is false -- the common case -- both copies are discarded unmodified. Take that path first and compare in place. CacheStorageCache::computeKeyURL() built a whole URL just to call removeQueryAndFragmentIdentifier() on it and read back the string. Truncate the URL's string directly instead, which is what removeQueryAndFragmentIdentifier() does internally, and which also skips the substring allocation entirely for URLs that have no query or fragment. Together these run once per bucket lookup plus once per record examined, for every match(), matchAll(), keys(), delete() and put(), as well as addAll()'s duplicate-request check. No change in behavior. * Source/WebCore/Modules/cache/DOMCacheEngine.cpp: (WebCore::DOMCacheEngine::matchURLs): * Source/WebKit/NetworkProcess/storage/CacheStorageCache.cpp: (WebKit::CacheStorageCache::computeKeyURL): Canonical link: https://commits.webkit.org/319765@main
https://bugs.webkit.org/show_bug.cgi?id=322460 rdar://185746232 Reviewed by Simon Fraser. Call sites temporarily clear an image's observer and restore it manually. Because restoration re-reads a mutable image variable, reassignment or an early exit can leave the CachedImage without its observer permanently. Introduce a small RAII guard that binds the image so restoration is tied to the originally bound image and guaranteed on every exit path. No behavior change. * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): * Source/WebCore/platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::drawLuminanceMaskPattern): * Source/WebCore/platform/graphics/Image.cpp: (WebCore::ImageObserverDisableScope::ImageObserverDisableScope): (WebCore::ImageObserverDisableScope::~ImageObserverDisableScope): * Source/WebCore/platform/graphics/Image.h: * Source/WebCore/svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawForContainer): (WebCore::SVGImage::nativeImage): Canonical link: https://commits.webkit.org/319766@main
https://bugs.webkit.org/show_bug.cgi?id=322365 rdar://184886311 Reviewed by David Kilzer. Drop the hardening added to DOMWrapperWorld in 315505@main now the cause of the crash has been identified. * Source/WebCore/bindings/js/DOMWrapperWorld.cpp: (WebCore::DOMWrapperWorld::DOMWrapperWorld): (WebCore::DOMWrapperWorld::~DOMWrapperWorld): (WebCore::DOMWrapperWorld::clearWrappers): (WebCore::initializeWrapperMapGuardingOnce): Deleted. (): Deleted. (WebCore::WTF_REQUIRES_LOCK): Deleted. (WebCore::WrapperMapTableMalloc::allocate): Deleted. (WebCore::WrapperMapTableMalloc::malloc): Deleted. (WebCore::WrapperMapTableMalloc::zeroedMalloc): Deleted. (WebCore::WrapperMapTableMalloc::free): Deleted. (WebCore::DOMWrapperWorld::setWrappersTableWritable): Deleted. (WebCore::WrapperMutationScope::enter): Deleted. (WebCore::WrapperMutationScope::leave): Deleted. * Source/WebCore/bindings/js/DOMWrapperWorld.h: (WebCore::DOMWrapperWorld::noteTableBacking): Deleted. (WebCore::DOMWrapperWorld::forgetTableBacking): Deleted. (WebCore::WrapperMutationScope::WrapperMutationScope): Deleted. (WebCore::WrapperMutationScope::~WrapperMutationScope): Deleted. (WebCore::WrapperMutationScope::currentlyMutatedWorld): Deleted. * Source/WebCore/bindings/js/JSDOMWrapperCache.h: (WebCore::cacheWrapper): (WebCore::uncacheWrapper): Canonical link: https://commits.webkit.org/319767@main
…h's bug and title in .git/config https://bugs.webkit.org/show_bug.cgi?id=321562 rdar://184673539 Reviewed by Sam Sneddon. `write_branch_variables` wrote every value with `git config --add`, which appends rather than replaces, so each run left another copy of `branch.<name>.bug` and `branch.<name>.title` behind. - Write a key's first value with `--replace-all` and the rest with `--add`, making the write idempotent and collapsing duplicates that earlier runs left behind - Pass bug URLs as a list rather than joining them with a newline: `git config -l` would unescape the newline but the value was truncated at the first URL and the remainder became a bogus key in `Git.config()` - Modeled `--add` as appending in `mocks.local.Git`, taught it the `--list` spelling of `-l`, and made both report every value of a repeated key rather than flattening them through a dict, without which no test can observe the duplication - `RE_ELEMENT` was mis-parsing config values that contain '=' * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: (Git): * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py: (Branch.main): * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py: (Command.write_branch_variables): * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py: (PullRequest.pull_request_branch_point): * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py: * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/command_unittest.py: (TestFilteredCommandRevision.test_revision_in_body_not_transformed): (TestWriteBranchVariables): (TestWriteBranchVariables.setUp): (TestWriteBranchVariables.values_for): (TestWriteBranchVariables.test_single_value_is_not_duplicated): (TestWriteBranchVariables.test_value_is_replaced): (TestWriteBranchVariables.test_multiple_values_are_kept): Canonical link: https://commits.webkit.org/319768@main
https://bugs.webkit.org/show_bug.cgi?id=322461 rdar://185747815 Reviewed by Chris Dumez. * Source/WebCore/Modules/web-locks/WebLockManager.cpp: (WebCore::WebLockManager::request): Canonical link: https://commits.webkit.org/319769@main
… upstream https://bugs.webkit.org/show_bug.cgi?id=322454 Reviewed by Tim Nguyen. The imported copies of these tests predate w3c/csswg-drafts#5180, which moved the line-relative values top, center and bottom off alignment-baseline onto baseline-shift. They still assert those three are valid, so WebKit -- which already rejects them, correctly -- reports three FAILs per file that describe the grammar as it no longer is. Upstream has since flipped those three over to alignment-baseline-invalid.html, and added hanging, which WebKit accepts, to the valid and computed tests. Refresh alignment-baseline-{valid,computed,invalid}.html and the css-typed-om alignment-baseline.html from upstream, and rebaseline. This changes which assertions run, not what WebKit does: nine stale FAILs go away and five new PASSes appear, and no subtest goes from PASS to FAIL. The rest of css/css-inline is deliberately left alone. Upstream's vertical-align tests there now assert css-inline-3's shorthand grammar, which WebKit does not implement, so importing them belongs in its own change. text-top and text-bottom still FAIL. Those are genuinely unimplemented, and are fixed in bug 321612. * LayoutTests/imported/w3c/web-platform-tests/css/css-inline/parsing/alignment-baseline-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-inline/parsing/alignment-baseline-computed.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-inline/parsing/alignment-baseline-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-inline/parsing/alignment-baseline-invalid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-inline/parsing/alignment-baseline-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-inline/parsing/alignment-baseline-valid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/alignment-baseline-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/alignment-baseline.html: Canonical link: https://commits.webkit.org/319770@main
https://bugs.webkit.org/show_bug.cgi?id=322467 rdar://185752888 Reviewed by Chris Dumez. Geolocation interleaves its one-byte members with pointer-sized ones, leaving 11 bytes of interior padding: 6 after m_hasBeenRequested/m_allowGeolocation, and 5 after the three bools that follow m_authorizationToken. Group AllowGeolocation and the four bools at the end of the class, and move the pointer-sized members up with the rest. sizeof(Geolocation) goes from 328 to 320. Verified with -fdump-record-layouts; the saving holds on every 64-bit ABI including MSVC, and 32-bit targets are unaffected. No behaviour change. * Source/WebCore/Modules/geolocation/Geolocation.h: Canonical link: https://commits.webkit.org/319771@main
https://bugs.webkit.org/show_bug.cgi?id=322414 rdar://problem/185702236 Reviewed by Tim Nguyen. Upstream commit: web-platform-tests/wpt@8ef1302 Canonical link: https://commits.webkit.org/319772@main
https://bugs.webkit.org/show_bug.cgi?id=316052 Reviewed by Carlos Garcia Campos. Opacity applies to the whole group it composites, but SkiaCompositingLayer only damaged the layer itself, so a descendant layer painting outside the layer bounds kept its stale pixels. Masks used to have the same issue, and we solved it by introduced a m_maskChanged flag and mask-specific damage collector. Generalize both into one m_groupPropertyChanged flag, set through groupPropertyChanged() by every property that decides how the group is composited: opacity, filter, mask blend mode and replica. collectGroupDamage() now damages the layer plus the overlap region of its subtree, which fixes the problem. Added new GTK/WPE specific damage tests, where coverage was missing. * LayoutTests/platform/glib/damage/animations-opacity-with-descendant-layer-expected.txt: Added. * LayoutTests/platform/glib/damage/animations-opacity-with-descendant-layer.html: Added. * LayoutTests/platform/glib/damage/layer-blend-mode-change-expected.txt: Added. * LayoutTests/platform/glib/damage/layer-blend-mode-change.html: Added. * LayoutTests/platform/glib/damage/layer-opacity-change-with-descendant-layer-expected.txt: Added. * LayoutTests/platform/glib/damage/layer-opacity-change-with-descendant-layer.html: Added. * Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp: (WebCore::SkiaCompositingLayer::setOpacity): (WebCore::SkiaCompositingLayer::setBlendMode): (WebCore::SkiaCompositingLayer::setMask): (WebCore::SkiaCompositingLayer::setReplica): (WebCore::SkiaCompositingLayer::setFilters): (WebCore::SkiaCompositingLayer::opacityForAnimationsState const): (WebCore::SkiaCompositingLayer::opacity const): (WebCore::SkiaCompositingLayer::syncAnimations): (WebCore::SkiaCompositingLayer::addGroupDamage): (WebCore::SkiaCompositingLayer::collectGroupDamage): (WebCore::SkiaCompositingLayer::paintWithMaskAndBackdrop): (WebCore::SkiaCompositingLayer::paintWithFilterAndMask): (WebCore::SkiaCompositingLayer::recursiveCleanUpAfterPaint): (WebCore::SkiaCompositingLayer::collectMaskDamage): Deleted. * Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.h: Canonical link: https://commits.webkit.org/319773@main
https://bugs.webkit.org/show_bug.cgi?id=322416 Reviewed by Anne van Kesteren. Replaced a raw pointer with CheckedPtr. No new tests since there should be no behavioral changes. * Source/WebCore/dom/Node.h: Canonical link: https://commits.webkit.org/319774@main
… ports https://bugs.webkit.org/show_bug.cgi?id=322425 Reviewed by Carlos Garcia Campos. The GLib arm of the guard also required COMPILER(GCC), because clang is slow to build with IPC testing enabled. The ports build with clang by default though, and every GCC-based GLib CI job is build-only, so no bot that runs layout tests has the API compiled in: window.IPC is undefined and the ipc/ tests return early and report PASS without testing anything. The slowness is one file. SerializedTypeInfo.cpp gets one initializer entry per serialized type, making allSerializedTypes() a single 29000-line function that clang takes 52 minutes to compile at -O3 and 34 seconds at -O0. Only the GLib ports ever optimize it, because Cocoa enables IPC testing on debug builds while the GTK and WPE bots enable assertions on release builds. Build that file without optimizations, and the COMPILER(GCC) term can go. Skip the two tests that then fail. * Source/WTF/wtf/PlatformEnable.h: * Source/WebKit/CMakeLists.txt: * LayoutTests/platform/glib/TestExpectations: Canonical link: https://commits.webkit.org/319775@main
https://bugs.webkit.org/show_bug.cgi?id=322477 Unreviewed. Update safer C++ expectations. * Source/WebKitLegacy/SaferCPPExpectations/UncountedLambdaCapturesCheckerExpectations: Canonical link: https://commits.webkit.org/319776@main
https://bugs.webkit.org/show_bug.cgi?id=322370 Reviewed by Yusuke Suzuki. MacroAssemblerARM64::branch32/branch64 route a zero immediate through commuteCompareToZeroIntoTest(), which rewrites a relational condition into the equivalent test condition so the branch becomes a single cbz/cbnz instead of a cmp plus b.cond. The switch covered Equal, NotEqual, LessThan and GreaterThanOrEqual but not the unsigned pair, although unsigned x > 0 is exactly x != 0 and unsigned x <= 0 is exactly x == 0. That gap costs an instruction in every unfenced write barrier. blackThreshold is 0, so AssemblyHelpers::barrierBranchWithoutFence() asks for branch8(Above, cellState, TrustedImm32(blackThreshold)) and gets ldurb w17, [x1, #7] cmp w17, #0 b.hi skipBarrier where cbnz w17 does the same work. Scanning everything the JITs emit while running JetStream 3 (54.7M instructions) reports 65764 sites, 99.4% of them this barrier: 27158 in DFG OSR exit stubs, where osrWriteBarrier() emits the sequence once per exit, 26303 in DFG code, 7580 in FTL OSR exits and 4723 in wasm BBQ. The whole class is gone from a re-scan after this change, removing roughly 263 KB of dead compares from that run. MacroAssemblerX86_64 carries the same switch and the same gap, so extend it there too. test reg, reg clears CF, so Above (CF == 0 && ZF == 0) is exactly NonZero and BelowOrEqual (CF == 1 || ZF == 1) is exactly Zero, and the resulting test is also shorter to encode than the cmp against an immediate. The fenced barrierBranch(vm, ...) form compares against vm.heap.barrierThreshold, a runtime value that the collector raises to a tautological threshold, and correctly keeps its compare. Found with armlint. * Source/JavaScriptCore/assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::commuteCompareToZeroIntoTest): * Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::commuteCompareToZeroIntoTest): Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Canonical link: https://commits.webkit.org/319777@main
https://bugs.webkit.org/show_bug.cgi?id=322333 Reviewed by Yusuke Suzuki. The parser guards its own recursion and accepts destructuring patterns nested ~20k levels deep, but ArrayPatternNode::bindValue recurses into nested patterns with no stack check. Each level costs about 1KB of native stack for the iterator temporaries and try/finally machinery, so a pattern several thousand levels deep overflows the stack before the parser's limit is reached: let [[[ /* 12000 levels */ z ]]] = []; // SIGSEGV ObjectPatternNode::bindValue has the same unbounded recursion. Add the isSafeToRecurse() check that emitNode() already performs to the top of both bindValue implementations. On failure, bytecode generation reports ParserError::OutOfMemory and the caller sees a catchable RangeError, matching other engines. Test: JSTests/stress/destructuring-pattern-deep-recursion.js * JSTests/stress/destructuring-pattern-deep-recursion.js: Added. (shouldThrowRangeError): * Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp: (JSC::ArrayPatternNode::bindValue const): (JSC::ObjectPatternNode::bindValue const): Canonical link: https://commits.webkit.org/319778@main
…() offset with a negative playbackRate https://bugs.webkit.org/show_bug.cgi?id=322373 Reviewed by Jean-Yves Avenard. start() silently clamps offset to [0, duration], so a negative playbackRate can leave the playhead exactly at the end of the buffer. renderFromBuffer() decided once per render quantum whether the playhead was usable and returned false when it was not, making process() zero the whole bus. But only the first frame is outside the buffer: the playhead immediately descends back into it. A 4-frame buffer started at offset == duration with rate -1 therefore rendered four silent frames instead of one silent frame followed by 4, 3, 2. This aligns us with the spec, which makes that decision per frame rather than per quantum: ``` if (bufferTime >= 0 && bufferTime < buffer.duration) output.push(playbackSignal(bufferTime)); else output.push(0); // past end of buffer, so output silent frame ``` Unlike bugs 320870 and 322372, no spec ambiguity is involved: the existing text already specifies this, and we simply did not implement it. It also aligns us with Blink, whose "Reverse Out-Of-Bounds Playhead Catch-up" loop in AudioBufferSourceHandler::RenderFromBuffer() is equivalent, added for the same reason. Forward playback is unaffected. With a positive rate the playhead only moves further past the end of the buffer, so bailing out and rendering silence was already the correct result and still is. * LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-playbackrate-negative-expected.txt: Rebaselined: "handles offset exactly at duration with negative rate" and "handles out-of-bounds start offset correctly" now pass. The one remaining failure is a negative loopStart, addressed separately in bug 322372. * Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderFromBuffer): Canonical link: https://commits.webkit.org/319779@main
rdar://185212996 https://bugs.webkit.org/show_bug.cgi?id=322021 Reviewed by Jean-Yves Avenard. * Source/ThirdParty/libwebrtc/Source/third_party/libvpx: Resynced. Canonical link: https://commits.webkit.org/319780@main
https://bugs.webkit.org/show_bug.cgi?id=322022 rdar://problem/185213886 Reviewed by Jean-Yves Avenard. * Source/ThirdParty/libwebrtc/Source/third_party/libaom: Resynced. Canonical link: https://commits.webkit.org/319781@main
https://bugs.webkit.org/show_bug.cgi?id=322388 Reviewed by Yusuke Suzuki. The WebIDL web-platform-test "If the implementation has a stack property on normal errors, it also does on DOMExceptions" was still failing after 318930@main. That test compares typeof new Error().stack against typeof (new DOMException()).stack; we returned "string" for the former and "undefined" for the latter. Firefox passes this test; Chrome fails it. 318930@main gave DOMException's JS wrapper the [[ErrorData]] internal slot by making it a genuine JSC::ErrorInstance subclass, but deliberately opted out of stack capture (StackTraceCapturePolicy::DoNotCapture) to keep the property set byte-for-byte unchanged. Now that a DOMException really is an ErrorInstance, there is no reason for it to be the one error in the engine without a stack, so let it capture one like any other. ErrorInstance's DoNotCapture policy had exactly one caller, so the enum is replaced by a single named entry point, finishCreationForEmbedderError(), which captures a stack trace but still adds no own "message" / "cause" properties. JSDOMErrorWrapper calls it. "stack" (and WebKit's non-standard "line", "column" and "sourceURL") then materialize lazily through the existing materializeErrorInfoIfNeeded() path, so they are DontEnum and honour Error.stackTraceLimit exactly as they do for a plain Error, and DOMException's name/message continue to come from the WebIDL getters on the prototype rather than from own properties. This also covers DOMException's subclasses (WebTransportError, GPUPipelineError, RTCError, OverconstrainedError). Giving DOMException a stack also stops WPT's structured-cloning-error-stack-optional.sub.window.html from skipping its DOMException cases, at which point it asserts that a clone reports the same stack as the original. That failed, because dumpDOMException() serialized only the name and message, so a clone reported the stack of whichever frame did the deserializing. The four "web API-created DOMException" subtests were already failing this way, since createDOMException() has always given engine-thrown DOMExceptions a stack. So serialize the line/column/sourceURL/stack alongside the name and message. That needs wire format version 16, and the extra fields are read back behind a version check so version 15 and earlier data still deserializes. ErrorInstance::setErrorInfoForEmbedderError() replaces the stack trace captured when the wrapper was created with the deserialized information, still leaving the properties to materialize lazily, so a cloned DOMException and a cloned Error behave the same way. All 20 subtests of that test pass now, up from 12. createDOMException()'s addErrorInfo() call is now partly redundant, since creating the wrapper on the preceding line already captures a stack trace, but it is kept: it is what gives a "stack" of "" to exceptions created with no JS frames on the stack, such as an asynchronous rejection. Dropping it made WebGPU's mapping.spec.js fail its typeof ex.stack === 'string' assertion for mapAsync rejections. Two consequences worth noting. Surfacing a DOM exception to JS now pays for a stack trace capture, the same cost `new Error()` already pays. And, as with every serialization version bump, data written by this build cannot be read by older versions of WebKit. * LayoutTests/fast/storage/serialized-script-value.html: Bump the pinned wire format version. * LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window-expected.txt: * LayoutTests/js/dom/dom-exception-stack.html: Added. * LayoutTests/js/dom/dom-exception-stack-expected.txt: Added. * Source/JavaScriptCore/runtime/ErrorInstance.cpp: (JSC::ErrorInstance::finishCreationForEmbedderError): (JSC::ErrorInstance::setErrorInfoForEmbedderError): * Source/JavaScriptCore/runtime/ErrorInstance.h: * Source/JavaScriptCore/runtime/StructuredCloneTags.h: * Source/WebCore/bindings/js/JSDOMWrapper.h: (WebCore::JSDOMErrorWrapper::finishCreation): * Source/WebCore/bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpDOMException): (WebCore::CloneDeserializer::readDOMException): Canonical link: https://commits.webkit.org/319782@main
…s failing https://bugs.webkit.org/show_bug.cgi?id=273477 Reviewed by Carlos Garcia Campos. WebKit shapes vertical writing-mode text as an ordinary horizontal HarfBuzz buffer (LTR/RTL direction) and relies on the font's OpenType 'vert'/'vrt2' GSUB features to substitute glyphs with their vertical forms. HarfBuzz only auto-enables 'vert'/'vrt2' for buffers shaped in a vertical direction (TTB/BTT), which WebKit never uses. Thus, 'ComplexTextControllerSkia' must request these features explicitly (otherwise vertical glyph substitution won't happen). Fix by explicitly requesting 'vert'/'vrt2' whenever the font is vertically oriented. Also add 'findScriptForVerticalGlyphSubstitution()', almost identical to Harfbuzz's implementation, which looks up in which script the font actually registers 'vert' and 'vrt2' and uses that script for shaping. * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/platform/graphics/skia/ComplexTextControllerSkia.cpp: (WebCore::findScriptForVerticalGlyphSubstitution): (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Canonical link: https://commits.webkit.org/319783@main
https://bugs.webkit.org/show_bug.cgi?id=322268 rdar://185504660 Reviewed by Ian Grunert and Elliott Williams. We can't import Foundation into WebKit Swift on Windows, due to a conflict between WTF's ICU and the Foundation ICU. While this is resolved, import only FoundationEssentials. Canonical link: https://commits.webkit.org/319784@main
https://bugs.webkit.org/show_bug.cgi?id=322471 rdar://185759621 Reviewed by Richard Robinson. Certain scroll gestures are configured to not require a trailing momentum stage. In this patch, we begin respecting that. * Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm: (-[WKAppKitGestureController sendWheelEventForGesture:]): Canonical link: https://commits.webkit.org/319785@main
https://bugs.webkit.org/show_bug.cgi?id=321580 rdar://180734422 Reviewed by Kimmo Kinnunen. Fix a correctness issue in MSL symbol table key comparison. Previously, we mistakenly compared the variable's unique ID with itself, leading to incorrect translator state that crashes later in the pipeline, or emits invalid MSL. This change corrects the comparison logic, but does not update the hash template specialisation for VarField, which continues to use object addresses rather than unique IDs to avoid behavioural changes and to stay consistent with the more common pattern in this part of the codebase. * Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj: * Source/ThirdParty/ANGLE/src/compiler/translator/msl/SymbolEnv.h: (sh::VarField::operator== const): * Source/ThirdParty/ANGLE/src/tests/angle_unittests.gni: * Source/ThirdParty/ANGLE/src/tests/compiler_tests/MSLSymbolEnv_test.cpp: Added. (sh::TEST(MSLSymbolEnv, VarFieldEquality)): Canonical link: https://commits.webkit.org/319786@main
rdar://185298317 https://bugs.webkit.org/show_bug.cgi?id=322099 Reviewed by Jean-Yves Avenard. We resync libwebrtc up to M152 and update WebCore binding code according api changes. * Source/ThirdParty/libwebrtc/CMakeLists.txt: * Source/ThirdParty/libwebrtc/Configurations/libwebrtc.exp: * Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj: * Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransformableFrame.cpp: (WebCore::timestampFromRtpTimestampInfo): (WebCore::LibWebRTCRtpTransformableFrame::timestamp const): (WebCore::LibWebRTCRtpTransformableFrame::audioMetadata const): (WebCore::LibWebRTCRtpTransformableFrame::videoMetadata const): (WebCore::LibWebRTCRtpTransformableFrame::setOptions): * Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp: (WebCore::toRTCHeaderExtensionParameters): (WebCore::fromRTCHeaderExtensionParameters): * Source/ThirdParty/libwebrtc/Source/webrtc/p2p/base/packet_transport_internal.cc: * Source/ThirdParty/libwebrtc/Source/webrtc/p2p/base/packet_transport_internal.h: Canonical link: https://commits.webkit.org/319787@main
…_pendingStreamBytesSentByNetwork in imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event.https.h2.html rdar://184253301 https://bugs.webkit.org/show_bug.cgi?id=321191 Reviewed by Chris Dumez. 318042@main started failing the load when the fetch event request body is disturbed, since a body backed by a ReadableStream can no longer be provided We need to support a service worker reading a clone of the request, even if the original request gets to the network. PendingStreamState cannot have multiple consumers and we keep it this way for simplicity. To implement the correct functional behavior, in case a fetch event request that has a pending stream body, the request is cloned and the fetch event is not handled, we make the service worker do the fetch itself and we use this fetch for the fetch event. This ensures that all request body data gets to the service worker and to the network, through the readable stream tee algorithm. This also ensures that backward pressure is applied properly on the original readable stream. We now convert a pending stream FormData body into a ReadableStream before cloning it, so that FetchBody::clone tees it as it does for any other stream body. The original request keeps one branch and the clone gets the other, and each can be consumed independently. Finally, when the fetch event is left unhandled, the request body is canceled, so the request is marked as disturbed to make it unusable afterwards, as per specification. Covered by existing tests. * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event.https.h2-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event.https.h2.html: * LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/fetch-event-test-worker.js: (handleCloneAndIgnore): (handleCloneAfterIgnore): (async self): * LayoutTests/platform/glib/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event.https.h2-expected.txt: * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/Modules/fetch/FetchBody.cpp: (WebCore::FetchBody::clone): * Source/WebCore/Modules/fetch/FetchBody.h: (WebCore::FetchBody::setAsReadableStream): (WebCore::FetchBody::isPendingStreamFormData const): * Source/WebCore/Modules/fetch/FetchBodyOwner.cpp: (WebCore::FetchBodyOwner::cloneBody): (WebCore::FetchBodyOwner::hasClonedReadableStream const): * Source/WebCore/Modules/fetch/FetchBodyOwner.h: * Source/WebCore/Modules/fetch/FetchBodySource.h: * Source/WebCore/Modules/fetch/FetchRequest.cpp: (WebCore::FetchRequest::clone): * Source/WebCore/Modules/fetch/FetchRequest.h: * Source/WebCore/Modules/fetch/FetchResponse.cpp: (WebCore::FetchResponse::clone): * Source/WebCore/Modules/streams/ReadableStream.h: (WebCore::ReadableStream::controller const): * Source/WebCore/workers/service/FetchEvent.cpp: (WebCore::FetchEvent::respondWith): (WebCore::FetchEvent::processRespondWithPromise): * Source/WebCore/workers/service/FetchEvent.h: * Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp: (WebCore::ServiceWorkerFetch::dispatchFetchEvent): Canonical link: https://commits.webkit.org/319788@main
rdar://182485644 https://bugs.webkit.org/show_bug.cgi?id=322000 Reviewed by Jean-Yves Avenard. * Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/319789@main
…connectionState.https.html crashes https://bugs.webkit.org/show_bug.cgi?id=320653 Reviewed by Adrian Perez de Castro. The audio converted created in the outgoing audio source expects its input buffer to be writable because it is created with the GST_AUDIO_CONVERTER_FLAG_IN_WRITABLE flag. So when doing actual audio conversion the input buffer has to be mapped in read-write mode. * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/platform/mediastream/libwebrtc/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp: (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): Canonical link: https://commits.webkit.org/319995@main
https://bugs.webkit.org/show_bug.cgi?id=321896 rdar://185074362 Reviewed by Tyler Wilcock. Follow-up to: https://bugs.webkit.org/show_bug.cgi?id=320762 * LayoutTests/accessibility-isolated-tree/TestExpectations: * LayoutTests/accessibility/isolated-tree/mac/abbr-acronym-tags-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/abbr-acronym-tags.html: Added. * LayoutTests/accessibility/isolated-tree/mac/accessibility-make-first-responder-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/accessibility-make-first-responder.html: Added. * LayoutTests/accessibility/isolated-tree/mac/accesskey-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/accesskey.html: Added. * LayoutTests/accessibility/isolated-tree/mac/active-descendant-after-visibility-change-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/active-descendant-after-visibility-change.html: Added. * LayoutTests/accessibility/isolated-tree/mac/active-descendant-with-aria-controls-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/active-descendant-with-aria-controls.html: Added. * LayoutTests/accessibility/isolated-tree/mac/alt-for-css-content-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/alt-for-css-content.html: Added. * LayoutTests/accessibility/isolated-tree/mac/apple-pay-labels-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/apple-pay-labels.html: Added. * LayoutTests/accessibility/isolated-tree/mac/apple-pay-session-v4-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/apple-pay-session-v4.html: Added. * LayoutTests/accessibility/isolated-tree/mac/area-with-aria-label-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/area-with-aria-label.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-alerts-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-alerts.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-columnrowheaders-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-columnrowheaders.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-current-attribute-exposed-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-current-attribute-exposed.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-describedby-fieldset-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-describedby-fieldset.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-details-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-details.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-directory-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-directory.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-divs-not-ignored-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-divs-not-ignored.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-drag-drop-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-drag-drop.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-errormessage-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-errormessage.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-expanded-not-exposed-when-undefined-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-expanded-not-exposed-when-undefined.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-expanded-notifications-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-expanded-notifications.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-expanded-standard-items-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-expanded-standard-items.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-grid-with-strange-hierarchy-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-grid-with-strange-hierarchy.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-grouping-roles-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-grouping-roles.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-hidden-changes-for-non-ignored-elements-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-hidden-changes-for-non-ignored-elements.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-image-emits-object-replacement-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-image-emits-object-replacement.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-label-overrides-visible-text-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-label-overrides-visible-text.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-labelledby-multiple-child-crash-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-labelledby-multiple-child-crash.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-listbox-selectedchildren-change-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-listbox-selectedchildren-change.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregion-on-image-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregion-on-image.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-addedelement-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-addedelement.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-changedalt-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-changedalt.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-changedtext-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-changedtext.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-notifications-always-sent-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-notifications-always-sent.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-notifications-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-notifications.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-removedelement-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-liveregions-removedelement.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menu-closed-notification-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menu-closed-notification.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menu-item-selected-notification-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menu-item-selected-notification.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menu-open-notification-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menu-open-notification.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menu-role-descriptions-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menu-role-descriptions.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menubar-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menubar.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menuitem-checked-value-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menuitem-checked-value.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menuitem-focus-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-menuitem-focus.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-multiple-liveregions-notification-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-multiple-liveregions-notification.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-multiselectable-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-multiselectable.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translated-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translated.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-dropped-handler-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-dropped-handler.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-failure-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-failure.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-late-reply-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-late-reply.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-not-active-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-not-active.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-ordering-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-ordering.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-timeout-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-translation-timeout.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify-with-options.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-notify.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-owned-object-relative-frame-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-owned-object-relative-frame.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-popup-buttons-on-native-elements-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-popup-buttons-on-native-elements.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-popup-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-popup.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-pressed-button-attributes-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-pressed-button-attributes.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-radiobutton-text-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-radiobutton-text.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-radiogroup-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-radiogroup.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-required-popup-button-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-required-popup-button.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-slider-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-slider.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-spinbutton-crash-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-spinbutton-crash.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-spinbutton-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-spinbutton.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-table-with-colspan-cells-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-table-with-colspan-cells.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-toolbar-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-toolbar.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-activedescendant-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-activedescendant.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-index-of-items-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-index-of-items.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-item-children-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-item-children.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-item-name-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree-item-name.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-tree.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-treegrid-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-treegrid.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-valuetext-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-valuetext-on-native-slider-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-valuetext-on-native-slider.html: Added. * LayoutTests/accessibility/isolated-tree/mac/aria-valuetext.html: Added. * LayoutTests/accessibility/isolated-tree/mac/async-increment-decrement-action-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/async-increment-decrement-action.html: Added. * LayoutTests/accessibility/isolated-tree/mac/attachment-element-replacement-character-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/attachment-element-replacement-character.html: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-for-table-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-for-table.html: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-includes-highlighting-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-includes-highlighting.html: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-includes-insertion-deletion-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-includes-insertion-deletion.html: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-spanning-multiple-elements-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-spanning-multiple-elements.html: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-with-image-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string-with-image.html: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string/attributed-string-text-styling-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/attributed-string/attributed-string-text-styling.html: Added. * LayoutTests/accessibility/isolated-tree/mac/blockquote-level-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/blockquote-level.html: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-crash-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-crash.html: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-multibyte-glyphs-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-multibyte-glyphs.html: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-multiline-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-multiline.html: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-on-empty-text-control-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-on-empty-text-control.html: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-vertical-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range-vertical.html: Added. * LayoutTests/accessibility/isolated-tree/mac/bounds-for-range.html: Added. * LayoutTests/accessibility/isolated-tree/mac/br-element-properties-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/br-element-properties.html: Added. * LayoutTests/accessibility/isolated-tree/mac/br-element-text-selection-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/br-element-text-selection.html: Added. * LayoutTests/accessibility/isolated-tree/mac/button-shouldnot-have-axvalue-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/button-shouldnot-have-axvalue.html: Added. * LayoutTests/platform/mac-sequoia/TestExpectations: * LayoutTests/platform/mac-wk2/TestExpectations: * LayoutTests/platform/mac/TestExpectations: * LayoutTests/platform/mac/accessibility/isolated-tree/mac/aria-notify-with-options-expected.txt: Added. Canonical link: https://commits.webkit.org/319996@main
https://bugs.webkit.org/show_bug.cgi?id=322531 rdar://185827264 Reviewed by Wenson Hsieh. Currently, lvh and svh do not work with resizes-content. Based on the spec, when resizing the layout viewport, the CSS viewport units should reflect such changes. So, implement support for lvh and svh to respect resizes-content while also respecting override layout parameters. Key changes include: - _sizeResizedByInteractiveWidget: takes in the size passed and if resizes-content, will clamp to keyboard top (old logic in _dispatchSetViewLayoutSize which is now extracted to this function) - _dispatchSetMinimumUnobscuredSize and others: replaces setMinimumUnobscuredSize and alike by still calling setMinimumUnobscuredSize, but uses the size of what is passed in, and the clamp if it exists. This takes into account override layout parameters, will only clamp for resizes-content, and if override layout parameters are present with resizes-content, the clamp value only wins if the keyboard is up. - _dispatchSetActiveUnobscuredSizes: is called if interactiveWidgetValueChanged or if keyboardShouldResizeContent, where it will re-push override layout parameters if they exist, and then calls the dispatch functions (taking account of the resizes-content clamping if it exists). Additionally, add API tests for these cases: - overlays-content viewport units - resizes-content viewport units - override layout parameters with resizes-content viewport units * Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _recalculateViewportSizesWithMinimumViewportInset:maximumViewportInset:throwOnInvalidInput:]): * Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h: * Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _didCommitLayerTree:mainFrameData:pageData:transactionID:]): (-[WKWebView _sizeResizedByInteractiveWidget:]): (-[WKWebView _dispatchSetViewLayoutSize:]): (-[WKWebView _dispatchSetMinimumUnobscuredSize:]): (-[WKWebView _dispatchSetMaximumUnobscuredSize:]): (-[WKWebView _dispatchSetDefaultUnobscuredSize:]): (-[WKWebView _dispatchSetActiveUnobscuredSizes]): (-[WKWebView _frameOrBoundsMayHaveChanged]): (-[WKWebView _didStopDeferringGeometryUpdates]): (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]): (-[WKWebView _beginAnimatedResizeWithUpdates:]): (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumUnobscuredSizeOverride:maximumUnobscuredSizeOverride:]): * Tools/TestWebKitAPI/Resources/cocoa/InteractiveWidgetViewportUnits.html: Added. * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ios/InteractiveWidget.mm: Added. (viewportUnitLength): (setInteractiveWidget): (simulateKeyboardOfHeight): (focusInput): (TEST(InteractiveWidget, ViewportUnitsOverlaysContent)): (TEST(InteractiveWidget, ViewportUnitsResizesContent)): (TEST(InteractiveWidget, ViewportUnitsResizesContentWithOverriddenLayoutParameters)): Canonical link: https://commits.webkit.org/319997@main
https://bugs.webkit.org/show_bug.cgi?id=322765 JetStream3 ~1% regression (speculative) We observed ldp/stp causes performance regression in some patterns (that's why Air pair optimization is only for fp / sp) Reverted change: [JSC] Baseline: load adjacent metadata pointer fields with a single ldp https://bugs.webkit.org/show_bug.cgi?id=322566 319911@main (0a67a66) Canonical link: https://commits.webkit.org/319998@main
https://bugs.webkit.org/show_bug.cgi?id=322108 Reviewed by Adrian Perez de Castro. Epoxy.h can pull in xlib.h, which pollutes the namespace and causes problems later with unified sources. * Source/WebKit/SourcesGTK.txt: * Source/WebKit/SourcesWPE.txt: * Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/NonCompositedFrameRenderer.cpp: (WebKit::NonCompositedFrameRenderer::foreachRegionInDamageHistoryForTesting const): Canonical link: https://commits.webkit.org/319999@main
https://bugs.webkit.org/show_bug.cgi?id=321197 rdar://184255766 Reviewed by Yusuke Suzuki. This provides no extra semantic information, so there's no need for an indirection. Remove in line with our general push to de-macroify libpas' MTE implementation. No new tests because this is a purely syntactic change. * Source/bmalloc/libpas/src/libpas/pas_fast_megapage_table.h: (pas_fast_megapage_table_get): * Source/bmalloc/libpas/src/libpas/pas_large_map.c: (pas_large_map_find): (pas_large_map_add): (pas_large_map_take): * Source/bmalloc/libpas/src/libpas/pas_large_sharing_pool.c: (pas_large_sharing_pool_boot_free): (pas_large_sharing_pool_free): (pas_large_sharing_pool_allocate_and_commit): (pas_large_sharing_pool_compute_summary): * Source/bmalloc/libpas/src/libpas/pas_megapage_cache.c: (megapage_cache_allocate_aligned): * Source/bmalloc/libpas/src/libpas/pas_mte.h: * Source/bmalloc/libpas/src/libpas/pas_page_header_table.c: (pas_page_header_table_add): * Source/bmalloc/libpas/src/libpas/pas_page_header_table.h: (pas_page_header_table_get_for_boundary): * Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c: (pas_probabilistic_guard_malloc_allocate): (pas_probabilistic_guard_malloc_deallocate): * Source/bmalloc/libpas/src/libpas/pas_allocation_result.h: (pas_allocation_result_zero): * Source/bmalloc/libpas/src/libpas/pas_allocation_result.c: (pas_allocation_result_zero_large_slow): Canonical link: https://commits.webkit.org/320000@main
https://bugs.webkit.org/show_bug.cgi?id=322757 Unreviewed. Update safer C++ expectations. * Source/JavaScriptCore/SaferCPPExpectations/ForwardDeclCheckerExpectations: * Source/WebCore/SaferCPPExpectations/NoDeleteCheckerExpectations: * Source/WebCore/SaferCPPExpectations/UncheckedLocalVarsCheckerExpectations: * Source/WebCore/SaferCPPExpectations/UncountedLambdaCapturesCheckerExpectations: Canonical link: https://commits.webkit.org/320001@main
https://bugs.webkit.org/show_bug.cgi?id=198506 Reviewed by Yusuke Suzuki. BBQ and OMG now emit a bounds check against Table length and a load from ExternOrAnyRefTable::m_jsValues. * Source/JavaScriptCore/b3/B3AbstractHeapRepository.h: * Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp: * Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp: * Source/JavaScriptCore/wasm/WasmTable.h: Canonical link: https://commits.webkit.org/320002@main
https://bugs.webkit.org/show_bug.cgi?id=322723 Reviewed by Geoffrey Garen. Make the destruction of WeakPtr NODELETE. No new tests since there should be no behavioral differences. * Source/WTF/wtf/WeakPtrImpl.h: Canonical link: https://commits.webkit.org/320003@main
https://bugs.webkit.org/show_bug.cgi?id=322520 Reviewed by Yusuke Suzuki. BBQ and OMG load Table length instead of calling operationGetWasmTableSize. * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: * Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp: Canonical link: https://commits.webkit.org/320004@main
…ns, fix BGRX8 https://bugs.webkit.org/show_bug.cgi?id=322666 rdar://185939202 Reviewed by Mike Wyrzykowski. Instead of a full run-time sequence of decisions to determine which CG accelerated functions to use for different sets of pixel formats and alpha un/premultiplications, create a compile-time table pointing at simple functions, or at a templated special-case function that can be statically tailored (with `if constexpr` tests) to precise inputs. E.g.: - Same -> same: copyImagePixels(). - Premul -> Unpremul: Special case that will only do CG unpremul. - RGB -> BGR: Only CG permute channels. - Anything more complicated: CG any-to-any. - If anything goes wrong, ensure that the destination buffer is zeroed. This function table currently requires specific numeric values of PixelFormat and AlphaPremultiplication enums so that they can be efficiently used as indices; that's why RGBA16F was moved to 4th position. These constraints are statically checked. Use a similar set of template functions for the unaccelerated path. And use the same premultiply and unpremultiply formulas as vImage functions, for consistent results across platforms and easier testing. Also properly handle BGRX8, always treating it as effectively premultiplied, and avoiding incorrect channel permutations. Test: Tools/TestWebKitAPI/Tests/WebCore/PixelBufferConversionTests.cpp * Source/WebCore/platform/graphics/PixelBufferConversion.cpp: (WebCore::copyImagePixels): (WebCore::makeVImageCGImageFormat): (WebCore::convertImagePixelsAcceleratedAnyToAny): (WebCore::convertImagePixelsAccelerated4DifferentFormats): (WebCore::ConvertImagePixelsFunctionTable::ConvertImagePixelsFunctionTable): (WebCore::ConvertImagePixelsFunctionTable::get const): (WebCore::ConvertImagePixelsFunctionTable::CountPackedEnums::static_assert): (WebCore::ConvertImagePixelsFunctionTable::convertImagePixels4Function): (WebCore::ConvertImagePixelsFunctionTable::createConvertImagePixels4FunctionTable4): (WebCore::ConvertImagePixelsFunctionTable::createConvertImagePixels4FunctionTable3): (WebCore::ConvertImagePixelsFunctionTable::createConvertImagePixels4FunctionTable2): (WebCore::ConvertImagePixelsFunctionTable::createConvertImagePixels4FunctionTable1): (WebCore::ConvertImagePixelsFunctionTable::createConvertImagePixels4FunctionTable): (WebCore::convertImagePixelsAccelerated): (WebCore::convertImagePixels): (WebCore::makeVImageBuffer): (WebCore::convertImagePixelsUnaccelerated4): (WebCore::convertImagePixelsUnaccelerated3): (WebCore::convertImagePixelsUnaccelerated2): (WebCore::convertImagePixelsUnaccelerated1): (WebCore::convertImagePixelsUnaccelerated): (WebCore::hasEnoughBytesForConversion): (WebCore::zeroImagePixels): (WebCore::convertSinglePixelPremultipliedToPremultiplied): Deleted. (WebCore::convertSinglePixelPremultipliedToUnpremultiplied): Deleted. (WebCore::convertSinglePixelUnpremultipliedToPremultiplied): Deleted. (WebCore::convertSinglePixelUnpremultipliedToUnpremultiplied): Deleted. (WebCore::convertFunctor): Deleted. (WebCore::premultiply): (WebCore::unpremultiply): (WebCore::CountPackedEnums::static_assert): (WebCore::ConvertImagePixelsFunctionTable::getTableFunction): (WebCore::ConvertImagePixelsFunctionTable::createTableDepth4): (WebCore::ConvertImagePixelsFunctionTable::createTableDepth3): (WebCore::ConvertImagePixelsFunctionTable::createTableDepth2): (WebCore::ConvertImagePixelsFunctionTable::createTableDepth1): (WebCore::ConvertImagePixelsFunctionTable::createTable): (WebCore::convertImagePixelsAcceleratedDifferentFormats): (WebCore::ConvertImagePixelsAcceleratedFunctions::get): (WebCore::convertImagePixelsUnacceleratedFunction): (WebCore::ConvertImagePixelsUnacceleratedFunctions::get): (WebCore::ConvertImagePixelsFunctionTable::invoke const): (WebCore::ConvertImagePixelsFunctionTable::selectTableFunction): (WebCore::ConvertImagePixelsAcceleratedFunctions::selectFunction): (WebCore::ConvertImagePixelsUnacceleratedFunctions::selectFunction): * Source/WebCore/platform/graphics/PixelFormat.h: (WebCore::pixelComponentOrder): * Tools/TestWebKitAPI/Tests/WebCore/PixelBufferConversionTests.cpp: (TestWebKitAPI::TEST(PixelBufferConversionTests, convertImagePixels)): (TestWebKitAPI::TEST(PixelBufferConversionTests, convertImagePixels2)): * Source/WTF/wtf/StdLibExtras.h: (WTF::memcpySpan): * Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations: * Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations: Canonical link: https://commits.webkit.org/320005@main
https://bugs.webkit.org/show_bug.cgi?id=320507 rdar://183470357 Reviewed by Ryan Haddad. 259248@main fixed this bug in Package.archives(), switching from Version's __contains__ prefix matching to an exact one, but left Package.is_cached() comparing the cached manifest version with __contains__. A manifest cached under a looser pin (or from before 259248@main) can therefore still read as up to date even though it isn't an exact match. Switch is_cached() to the same exact-match comparison, so such a manifest is correctly treated as stale and reinstalled. * Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py: (Package.is_cached): Use != instead of not in for the version comparison. * Tools/Scripts/libraries/webkitcorepy/webkitcorepy/tests/autoinstall_unittest.py: (IsCachedTest): (IsCachedTest.setUp): (IsCachedTest.test_is_cached_rejects_loose_version_match): (IsCachedTest.test_is_cached_accepts_exact_version_match): Canonical link: https://commits.webkit.org/320006@main
https://bugs.webkit.org/show_bug.cgi?id=322713 Reviewed by Yusuke Suzuki. DFG::VariableEventStream keeps one 14 byte VariableEvent per event for as long as the DFG code lives, and its only reader is reconstruct() on OSR exit, which seeks back to the last Reset and replays the events from there. On JetStream3 (25,095 DFG compiles) the streams hold 4.76 million events, 66.6 MB over the run and 2.65 KB per DFG compile, mostly SetLocal and MovHint events whose payloads are small integers. This patch makes VariableEventStreamBuilder encode each event into a byte stream as SpeculativeJIT emits it, in the format described above the class in DFGVariableEventStream.h, and record the byte offset of every Reset in a side table. The stream index that SpeculativeJIT captures for each OSR exit, slow path and OSR entry is now a byte offset, so nothing has to map event counts to offsets afterwards; reconstruct() binary-searches the Reset table for the checkpoint and decodes forward to that offset. The events are still VariableEvents on both sides of the stream, so the emitters and the replay switch are unchanged; VariableEvent only loses the Packed<> wrappers that existed to make the stored array dense. This is the DFG counterpart of 319934@main, which did the same for FTL::OSRExitDescriptor. The LEB128 encoders that both streams need move to a new wtf/LEBEncoder.h, the counterpart of LEBDecoder.h, which in turn gains decode*OrCrash() for streams the process encoded itself, and the FTL stream switches its hand-rolled zigzag register offsets to the SLEB128 that WTF already decodes. On the same JetStream3 run the byte streams and Reset tables total 17.8 MB (3.7 bytes per event, -73%), 0.71 KB per DFG compile. Decoding adds 0.5 us to each reconstruct(). Test: Tools/TestWebKitAPI/Tests/WTF/LEBEncoder.cpp * Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::finalizeEventStream): * Source/JavaScriptCore/dfg/DFGVariableEvent.h: (JSC::DFG::VariableEvent::fillGPR): (JSC::DFG::VariableEvent::fillFPR): (JSC::DFG::VariableEvent::birth): (JSC::DFG::VariableEvent::spill): (JSC::DFG::VariableEvent::death): (JSC::DFG::VariableEvent::setLocal): (JSC::DFG::VariableEvent::movHint): (JSC::DFG::VariableEvent::id const): (JSC::DFG::VariableEvent::gpr const): (JSC::DFG::VariableEvent::fpr const): (JSC::DFG::VariableEvent::spillRegister const): (JSC::DFG::VariableEvent::operand const): (JSC::DFG::VariableEvent::machineRegister const): (JSC::DFG::VariableEvent::variableRepresentation const): * Source/JavaScriptCore/dfg/DFGVariableEventStream.cpp: (JSC::DFG::VariableEventStreamBuilder::logEvent): (JSC::DFG::VariableEventStream::encode): (JSC::DFG::VariableEventStream::decode): (JSC::DFG::VariableEventStream::reconstruct const): * Source/JavaScriptCore/dfg/DFGVariableEventStream.h: (JSC::DFG::VariableEventStream::VariableEventStream): (JSC::DFG::VariableEventStreamBuilder::VariableEventStreamBuilder): (JSC::DFG::VariableEventStreamBuilder::appendAndLog): (JSC::DFG::VariableEventStreamBuilder::size const): (JSC::DFG::VariableEventStreamBuilder::finalize): * Source/JavaScriptCore/ftl/FTLOSRExit.cpp: (JSC::FTL::OSRExitValues::encode): (JSC::FTL::OSRExitValues::decode const): (JSC::FTL::DFG::appendLEB): Deleted. (JSC::FTL::DFG::readLEB): Deleted. * Source/JavaScriptCore/ftl/FTLOSRExit.h: * Source/WTF/WTF.xcodeproj/project.pbxproj: * Source/WTF/wtf/CMakeLists.txt: * Source/WTF/wtf/LEBDecoder.h: (WTF::LEBDecoder::decodeUIntOrCrash): (WTF::LEBDecoder::decodeIntOrCrash): (WTF::LEBDecoder::decodeUInt32OrCrash): (WTF::LEBDecoder::decodeUInt64OrCrash): (WTF::LEBDecoder::decodeInt32OrCrash): (WTF::LEBDecoder::decodeInt64OrCrash): * Source/WTF/wtf/LEBEncoder.h: Added. (WTF::LEBEncoder::encodeUInt): (WTF::LEBEncoder::encodeInt): (WTF::LEBEncoder::encodeUInt32): (WTF::LEBEncoder::encodeUInt64): (WTF::LEBEncoder::encodeInt32): (WTF::LEBEncoder::encodeInt64): * Tools/TestWebKitAPI/CMakeLists.txt: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WTF/LEBEncoder.cpp: Added. (TestWebKitAPI::testUInt32LEBEncode): (TestWebKitAPI::testInt32LEBEncode): (TestWebKitAPI::TEST(WTF, LEBEncoderUInt32)): (TestWebKitAPI::TEST(WTF, LEBEncoderInt32)): (TestWebKitAPI::TEST(WTF, LEBEncoderRoundTrip64)): Canonical link: https://commits.webkit.org/320007@main
…e natural aspect ratio https://bugs.webkit.org/show_bug.cgi?id=322736 rdar://186006463 Reviewed by Simon Fraser. An SVG image whose natural aspect ratio is extreme e.g. a viewBox of "0 0 1 2147483647" with one specified dimension, rounds the derived dimension of its resolved intrinsic size down to zero in RenderBoxModelObject::calculateImageIntrinsicDimensions() (8 * 1 / 2147483647 floors to 0 as a LayoutUnit). BackgroundPainter::calculateFillTileSize()'s cover/contain handling then scales that intrinsic size by a single factor, which can never recover the lost dimension: it hits the isEmpty() guard and returns an empty tile, so nothing is painted. cover on such an image is supposed to fill the positioning area. The cover and contain concrete object size depends only on the natural aspect ratio and the constraint rectangle, not on the (possibly sub-pixel, rounded) intrinsic pixel size. When the resolved intrinsic size has collapsed to empty but the image still reports a non-empty natural ratio, derive the concrete size from the ratio and the positioning area directly: "A contain constraint is resolved by setting the concrete object size to the largest rectangle that has the object's natural aspect ratio and additionally has neither width nor height larger than the constraint rectangle's [...]. A cover constraint is resolved by setting the concrete object size to the smallest rectangle that has the object's natural aspect ratio and additionally has neither width nor height smaller than the constraint rectangle's [...]." [1] For an extreme ratio contain collapses the tiny axis to zero (empty, matching the -empty references) while cover expands it to fill the area (matching the -lime references). The new path only runs when the resolved intrinsic size is empty and a natural ratio exists, so ordinary cover/contain sizing is unchanged. This is CSS box code shared by both the legacy and layer-based SVG engines; the SVG image's natural ratio comes from SVGImage::computeIntrinsicDimensions. [1] https://drafts.csswg.org/css-images-3/#cover-contain * LayoutTests/TestExpectations: Unskip now passing tests * Source/WebCore/rendering/BackgroundPainter.cpp: (WebCore::BackgroundPainter::calculateFillTileSize): Canonical link: https://commits.webkit.org/320008@main
…9687ee # Conflicts: # Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.cpp # Source/JavaScriptCore/runtime/JSModuleLoader.cpp # Source/JavaScriptCore/runtime/JSModuleLoader.h # Source/JavaScriptCore/runtime/JSString.h # Source/JavaScriptCore/yarr/YarrJIT.cpp # Source/JavaScriptCore/yarr/YarrPattern.cpp # Source/cmake/WebKitCompilerFlags.cmake
Preview Builds
|
| @@ -1326,12 +1366,15 @@ class IntegerRangeOptimizationPhase : public Phase { | |||
| bool absIsUnchecked = !shouldCheckOverflow(node->arithMode()); | |||
| if (maxValue < 0 || (absIsUnchecked && maxValue <= 0)) { | |||
| node->convertToArithNegate(); | |||
| if (absIsUnchecked || minValue > std::numeric_limits<int>::min()) | |||
| if (absIsUnchecked || minValue > std::numeric_limits<int>::min()) { | |||
| pinRangeBounds(minBound, maxBound); | |||
| node->setArithMode(Arith::Unchecked); | |||
| } | |||
| changed = true; | |||
| continue; | |||
| } | |||
| if (minValue > std::numeric_limits<int>::min()) { | |||
| pinRangeBounds(minBound); | |||
| node->setArithMode(Arith::Unchecked); | |||
There was a problem hiding this comment.
🔴 RangeBound::proof is a raw const Relationship* into m_relationships[child1]'s backing Vector, but for ArithAbs the transform loop calls executeNode() between rangeFor() (line 1352) and pinRangeBounds() (lines 1370/1377). executeNode(ArithAbs) invokes setRelationship(Relationship(node, m_zero, …)), and setOneSide()'s transitive-equality propagation (lines 2063-2085 / 2119-2121) can recursively append() to m_relationships[child1] when an Equal edge links m_zero (or node) to child1. That append may reallocate the Vector, leaving minBound.proof/maxBound.proof dangling; pinRangeBoundProof() then dereferences freed memory at line 1076. …
Extended reasoning...
…ArithAdd/ArithSub pin before executeNode() and ArithMul's executeNode() is a no-op, so only ArithAbs is exposed. The fix is to pin before executeNode() (as the other ops do) or capture the proof's left()/right() Nodes by value in RangeBound instead of storing a Relationship*.
In FTL-compiled code where Math.abs(x) has an Int32 input x that IRO has proven equal to a negative constant via a non-constant node (e.g. x = y + (-3) with y proven 0 through a CheckInBounds/ArithAdd chain, so m_relationships[m_zero] holds m_zero Equal x + 3), the flipped setOneSide(m_zero, node, …) walks that Equal edge and appends a new relationship to m_relationships[x]. If that Vector is at capacity it reallocates, and the subsequent pinRangeBounds(minBound, maxBound) reads bound.proof->right()/left() from freed heap. Under ASAN this is a heap-use-after-free crash on the DFG/FTL compiler thread; in release builds it can read a stale/overwritten Relationship and call mergeFlags(NodeMustGenerate) on an arbitrary Node*, or crash. This is new behaviour…
Verification: normal — This is a newly-introduced use-after-free hazard. The RangeBound::proof field added in this diff (line 1026: const Relationship* proof { nullptr };) is populated by rangeFor() at line 1046 (minBound.proof = &relationship;) with a raw pointer into m_relationships.find(node)->value, a Vector<Relationship> (map type at line 1012: `UncheckedKeyHashMap<NodeFlowProjection,…
### Problem - Bun's WebKit pin `f5deafe090` is 343 upstream commits behind `6b879687ee` (2026-08-28), 77 of them in JavaScriptCore, WTF or bmalloc. oven-sh/WebKit#528 merges that range into the fork. - Upstream `c8fdf5eb81` adds a `const String& referrer` parameter to `GlobalObjectMethodTable::moduleLoaderFetch`. Bun's three implementations have the old shape and do not compile against the merged engine. - The range fixes three engine bugs Bun users can hit: a crash on a deeply nested destructuring pattern (`752ab90072`), a DFG misfold of a property in a non-reified static table (`33876268a1`; `process`, `Buffer` and `Event` use such tables), and DCE deleting the overflow check of checked Int32 arithmetic (`9f3eea6f46`). ### Fix - `WEBKIT_VERSION` is `1817c3c37f5dfc004a33dafac9f6adcf1a9641a4`, the merge commit of oven-sh/WebKit#528 on the fork's main (release `autobuild-1817c3c37f5dfc004a33dafac9f6adcf1a9641a4`, 42 tarballs, one per platform and flavor). Its tree is identical to the preview build `autobuild-preview-pr-528-41528be5` that CI ran against. - `GlobalObject::moduleLoaderFetch`, `StandaloneGlobalObject::moduleLoaderFetch` and `bakeModuleLoaderFetch` take the new `referrer` parameter and ignore it. This is the only Bun source change the range needs. - Verified: `test/js/bun/jsc/webkit-upgrade-6b879687ee.test.ts` pins the three fixes. At the current pin the first two crash the child process and the third prints seven `true`s. Eighteen more suites (3,719 tests) pass on a debug + ASAN build against the merged tree (notes). ### Background - Bun links a prebuilt JavaScriptCore from the oven-sh/WebKit release named in `scripts/build/deps/webkit.ts`. A fork pull request publishes a prerelease tagged `autobuild-preview-pr-<N>-<sha8>`. - `GlobalObjectMethodTable` holds the embedder hooks of a JSC global object. `moduleLoaderFetch` loads a module's source. WebCore uses `referrer` for the `Referer` header. - The DFG is JSC's optimizing JIT. An Absence PropertyCondition is its proof that a structure lacks a property. A static property table holds a class's built-in properties until the first access reifies them, so a structure can own a property its property table does not list. <details><summary>Notes</summary> - Conflict resolutions, the per-commit review of the upstream range (API and ABI changes, behavior changes, performance, build) and the `jsc` shell verification are in oven-sh/WebKit#528. - Behavior changes in the range that are visible from JavaScript: the three fixes pinned by the new test; a Wasm validator fix for `try`/`catch` result types that let `ref.test`/`ref.cast` be folded away on a narrower fallthrough type (`8f229fb729`); a use after free when a Proxy `apply` trap frees a `CallLinkInfo` from inside a polymorphic call (`7920db18a5`); a use after free when one thread grows a shared `WebAssembly.Memory` while another frees a sibling memory (`4002a938c8`); OMG inlining a SIMD callee into a non-SIMD function corrupting results (`9a17cd1100`); DFG fixes for a Uint32Array load typed Int32 (`8283d4f127`), a stale abstract value after folding `GetScope` (`cb05a6083a`), unpinned range proofs in integer range optimization (`03a07e4200`), a B3 select specialization leaving a dangling CSE entry (`1d5c10e2f9`) and a BackwardsGraph that dropped a back-edge source so LICM hoisted a control-dependent load (`7d867192b7`). A function whose bytecode metadata would overflow 32-bit offsets now fails with an out of memory error instead of corrupting memory (`97df94ead0`). - Performance changes of note: DFG `VariableEventStream` and FTL `OSRExitDescriptor` values become byte streams (upstream: 66.6 MB to 17.8 MB and 86 MB to 4.8 MB on JetStream3); `JSString::isDefinitelyAtom()` lets value profiling and the JITs skip dereferencing the StringImpl; `op_instanceof` metadata is linked so the LLInt caches `Symbol.hasInstance`; object rest destructuring clones through `objectCloneFast`; Temporal chinese and dangi calendar month walks are memoized (66x); write barriers compare against zero with `test`/`cbz`; GC `stopAllocating` sets and clears newly-allocated bits per word; the Wasm type registry is swept once per GC cycle instead of per module destruction; `table.size` and externref `table.get` are inlined in BBQ and OMG. - API changes Bun compiles against without change: `WTF::Expected` is now `std::expected` (Bun's `ExceptionOr`, `JSDOMConvertResult` and `CallbackResult` satisfy its constraints); `ScopedLambda` is non-copyable and takes a lambda directly; `ThreadSafeWeakPtr` loses its tagging parameter and locks on copy (Bun's `MessagePort` and `BroadcastChannel` registries); `VM::ClientData` gains a virtual `reconcileWeakReferencesAtGCEnd` with a default body; `ErrorInstance::finishCreation(VM&, StackTraceCapturePolicy)` becomes `finishCreationForEmbedderError`. - On Apple silicon, `d9d2fbd881` changes how JSC counts performance cores (M5 Pro/Max report a "Super" level), which sizes `numberOfGCMarkers` and the low-core DFG/FTL threshold scaling. - The fork keeps its own `YarrJIT.cpp`. Upstream's two Yarr commits in the range (lookbehinds with quantified groups and with lookaheads in the JIT) are ports of what the fork already compiles; their four tests pass on the fork's JIT and interpreter. - Suites run on the debug + ASAN build against the merged tree: `test/js/bun/jsc`, `bun/jsc-stress`, `node/events`, `node/util`, `node/vm`, `node/module`, `bun/resolve`, `node/worker_threads`, `bun/wasm`, `web/url`, `web/atomics`, `web/temporal`, `web/intl`, `web/workers`, `node/string_decoder`, `bundler/bundler_compile`, `bundler/bun-build-api`, `bundler/bun-build-compile`: 3,719 pass. The failures, all checked: 5 s or per-test timeouts under debug + ASAN that pass with a longer timeout (DOMJIT warm-up loops, `parseArgs` stress, `util.inspect`, the `vm.Script` leak check, worker termination, the `bun-build-api` bytecode tests, `bun-build-compile`'s `--compile --bytecode` cases; the compiled-executable aliasing check was run by hand and keeps 12.7 MB of instruction streams out of anonymous memory); tests that fail the same way on a debug + ASAN build of main at the current pin (`compile/HelloWorldWithProcessVersionsBun`, the worker "message flood" timing check, and the ASAN-only `terminate() while dns.lookup()` test, which fails on a LeakSanitizer report for a `node_fs_binding::Binding` that main already leaks, tracked separately); and one cascade from those (the cross-process `structured-clone` child). - #40674 moved the pin to `f5deafe090` and landed first; this branch is rebased on it. CI ran at the preview pin `autobuild-preview-pr-528-41528be5` (same tree as the merge commit) before the pin moved to the merge commit's release. </details> <!-- robobun:evidence:begin --> --- **[decide:webkit]** gate passed · iteration 2 · 6 files touched <details><summary>fails on main (without fix)</summary> ```console ASAN without fix: BUILD FAILED (no junit output) $ BUN_DEBUG_QUIET_LOGS=1 bun scripts/build.ts --profile=debug --quiet test "--reporter=junit" "--reporter-outfile=/tmp/mechgate.xml" "test/js/bun/jsc/webkit-upgrade-6b879687ee.test.ts" ninja: Entering directory `/workspace/bun/build/debug' [1/167] gen generated_host_exports.rs generated_host_exports.rs: 122 exports (host=5, lazy=10, generic=107, rust=0); 243 extern-C blocks audited [2/167] gen JSSink.{cpp,h,lut.h,rs} generated_jssink.rs: 7 sinks, 84 exported symbols Generating /workspace/bun/build/debug/codegen/JSSink.lut.h from /workspace/bun/build/debug/codegen/JSSink.lut.txt [3/167] gen ZigGeneratedClasses.{cpp,h,rs} Found 2 classes from /workspace/bun/src/jsc/resolve_message.classes.ts - ResolveMessage (15 fields) - BuildMessage (10 fields) Found 1 classes from /workspace/bun/src/runtime/api/Archive.classes.ts - Archive (4 fields, 1 class fields) Found 2 classes from /workspace/bun/src/runtime/api/BunObject.classes.ts - ResourceUsage (8 fields) - Subprocess (20 fields) Found 1 classes from /workspace/bun/src/runtime/api/cron.classes.ts - CronJob (5 fields) Found 3 classes from /workspace/bun/src/runtime/api/filesystem_router.classes.ts - FileSystem ... (truncated) release without fix: all passed bun test v1.4.1-canary.1 (b443464) test/js/bun/jsc/webkit-upgrade-6b879687ee.test.ts: (pass) WebKit 6b879687ee upgrade > an Absence PropertyCondition consults non-reified static property tables (33876268a1) [16.06ms] (pass) WebKit 6b879687ee upgrade > checked arithmetic keeps its overflow and negative zero checks under DCE (9f3eea6f46) [25.47ms] (pass) WebKit 6b879687ee upgrade > a destructuring pattern nested too deep does not crash bytecode generation (752ab90072) [56.02ms] 3 pass 0 fail 13 expect() calls Ran 3 tests across 1 file. [195.00ms] __F:0:S:0 ``` </details> <details><summary>passes on PR (with fix)</summary> ```console ASAN with fix: all passed $ BUN_DEBUG_QUIET_LOGS=1 bun scripts/build.ts --profile=debug --quiet test "--reporter=junit" "--reporter-outfile=/tmp/mechgate.xml" "test/js/bun/jsc/webkit-upgrade-6b879687ee.test.ts" bun test v1.4.1 (65362b5) test/js/bun/jsc/webkit-upgrade-6b879687ee.test.ts: (pass) WebKit 6b879687ee upgrade > a destructuring pattern nested too deep does not crash bytecode generation (752ab90072) [403.08ms] (pass) WebKit 6b879687ee upgrade > an Absence PropertyCondition consults non-reified static property tables (33876268a1) [455.66ms] (pass) WebKit 6b879687ee upgrade > checked arithmetic keeps its overflow and negative zero checks under DCE (9f3eea6f46) [1330.17ms] 3 pass 0 fail 13 expect() calls Ran 3 tests across 1 file. [3.50s] __F:0:S:0 release with fix: all passed $ bun scripts/build.ts --profile=release [configured] bun-profile → bun (stripped) target linux-x64-gnu build type Release build dir ./build/release revision 19abbf1 features baseline 23 deps, 131 codegen, 1172 objects in 715ms ninja: Entering directory `/workspace/bun/build/release' [1/145] gen generated_host_exports.rs generated_host_exports.rs: 122 exports (host=5, lazy=10, generic=107, rust=0); 243 extern-C blocks audited [2/145] gen ZigGeneratedClasses.{cpp,h,rs} Found 2 classes from /workspace/bun/src/jsc/resolve_message.classes.ts - ResolveMessage (15 fields) - BuildMessage (10 fields) Found 1 classes from /workspace/bun/src/runtime/api/Archive.classes.ts - Archive (4 fields, 1 class fields) Found 2 classes from /workspace/bun/src/runtime/api/BunObject.classes.ts - ResourceUsage (8 fields) - Subprocess (20 fields) Found 1 classes from /workspace/bun/src/runtime/api/cron.classes.ts - CronJob (5 fields) Found 3 classes from /workspace/bun/src/runtime/api/filesystem_router.classes.ts - FileSystemRouter (5 fields) - FrameworkFileSystemRouter (2 fields) - MatchedRoute (8 fields) Found 1 classes from /workspace/ ... (truncated) ``` </details> <details><summary>diff hotspot</summary> ``` scripts/build/deps/webkit.ts | 2 +- .../verify-baseline-static/allowlist-aarch64.txt | 3 +- src/jsc/bindings/ZigGlobalObject.cpp | 10 +- src/jsc/bindings/ZigGlobalObject.h | 4 +- src/runtime/bake/BakeGlobalObject.cpp | 6 +- test/js/bun/jsc/webkit-upgrade-6b879687ee.test.ts | 168 +++++++++++++++++++++ 6 files changed, 181 insertions(+), 12 deletions(-) ``` </details> **gate history** · 2 passed · 0 rejected · iteration 2 <details><summary>evidence per changed file</summary> ``` file reads edits tests scripts/build/deps/webkit.ts 0 0 0 scripts/verify-baseline-static/allowlist-aarch64.txt 0 0 0 src/jsc/bindings/ZigGlobalObject.cpp 0 0 0 src/jsc/bindings/ZigGlobalObject.h 0 0 0 src/runtime/bake/BakeGlobalObject.cpp 0 0 0 test/js/bun/jsc/webkit-upgrade-6b879687ee.test.ts 1 1 0 ``` </details> <!-- robobun:evidence:end -->
Merges upstream WebKit main at
6b879687ee(2026-08-28): 343 commits since the previous merge base8c4fd56347(2026-08-23), 77 of them touching JavaScriptCore, WTF or bmalloc.git merge-base origin/main upstream/mainreports8c4fd56347directly (#503 landed as a merge commit), so no graft was needed. This merge commit has6b879687eeas its second parent.The companion Bun PR is oven-sh/bun#40681. It needs one source change:
c8fdf5eb81adds aconst String& referrerparameter toGlobalObjectMethodTable::moduleLoaderFetch, so every BunmoduleLoaderFetch(ZigGlobalObject, StandaloneGlobalObject, BakeGlobalObject) gains that parameter.Conflict resolutions
bytecode/UnlinkedMetadataTable.cpp(97df94ead0): upstream computes the metadata offsets infinalize()withCheckedUint32, rejects a table whoseoffset + s_offset32TableSize + valueProfiles * sizeof(ValueProfile)does not fit 32 bits, and makesfinalize()returnbool(the generator turns a failure intoParserError::OutOfMemory). The fork'sfinalize()(Bytecode cache: smaller payloads that page in only what is decoded (alias mapped bytes, region layout, 32-bit offsets, sparse metadata table) #494) allocates only the offset table and leaves the ValueProfile and LinkingData allocation tolink(), which sizes it fromtotalSize(). Resolution: upstream's checked computation and failure path are kept (the bound still protectslink()), the fork'sASSERT(!m_isLinked)and offset-table-only allocation stay, and the now unusedvalueProfileSizelocal is dropped. The two comments now point atlink(). The fork's cached-steps layout (expandSteps) keeps its ownRELEASE_ASSERTagainst a 32-bit offset overflow.runtime/JSModuleLoader.cpp,.h(c8fdf5eb81): upstream addsconst String& referrertoloadModuleand passesmoduleReferrer(referrer)fromrequestImportModule; the fork had already addedint64_t referrerAsyncOrderto both functions. Both parameters are kept:loadModule(..., OptionSet<ModuleLoadFlag>, int64_t referrerAsyncOrder = -1, const String& referrer = { }), andrequestImportModulepasses both. The fork's extrafetch()call inhostLoadImportedModule(the synchronousrequire(esm)re-issue underm_synchronousModuleQueue) passesmoduleReferrer(referrerKey), the same value as upstream'sStatus::Newcall site a few lines below.runtime/JSString.h(24f0a33655): upstream'sisDefinitelyAtom(),markAsAtom()andexistingAtomOrNull()land next to the fork'svalue(jsstring_iterator*)declaration. Both kept.yarr/YarrJIT.cpp,yarr/YarrPattern.cpp(d21310b806,44ebe94906): kept at the fork's version (Yarr: JIT lookbehinds, first-code-point alternation dispatch, Boyer-Moore and /u·/v spec alignment, RegExp correctness fixes #299 policy, as in Upgrade to upstream WebKit 47f7250137c6 #455 and Upgrade to upstream WebKit 8c4fd56347 #503). Both upstream commits are ports of capabilities the fork's mirrored-frame lookbehind JIT already has:mirrorAlternativeIntomirrors groups of any quantifier and deep-copies nested forward assertions throughcopyForwardDisjunctionForMirror, the zero-iteration backtrack already skipsemitClearCapturesForTermfor a split copy (isCopy), and the lazy re-entry branch is already direction-aware (op.m_direction == Backward ? Below : Above). TheYarrPattern.cppconflict was a comment. Upstream's four new tests pass on the fork's JIT and with--useRegExpJIT=false(see Verification).Source/cmake/WebKitCompilerFlags.cmake(82220a2f11): upstream moves the sanitizer link flags from theCMAKE_*_LINKER_FLAGSstrings toadd_link_options. The fork's Windows ASAN runtime selection (the static-CRTclang_rt.asan_static_runtime_thunk,/WHOLEARCHIVEso the thunk's interceptor objects are not dropped) is carried over asadd_link_options("/WHOLEARCHIVE:${CLANG_ASAN_LIBRARY}" ${CLANG_ASAN_RT_LIBRARY}).Checked and unchanged:
runtime/JSType.h,.github/workflows, the release tarball names. The WebCore bindings generator change in the range (IDLAttributes.json,preprocess-idls.pl) does not affect the JSCOnly build.Verification
bun run jsc:build:debug(Linux x64, debug + ASAN, clang 21): builds, thejscshell runs.jscwith the options their headers name (jsstring-definitely-atom-bit.jsneeds--useDollarVM=1, the three Wasm tests need-m,multimemory-shared-grow-refreshes-only-its-own-slots.jsalso needsASAN_OPTIONS=allow_user_segv_handler=1for the fault signal handler).unlinked-metadata-table-finalize-overflow.jsis skipped on debug builds upstream. The four new Yarr lookbehind tests pass in JIT and--useRegExpJIT=falsemode on the fork's YarrJIT.80fc868e73,1330d5747e,2b0e50239achange codegen every Yarr pattern goes through): all 296JSTests/stress/regexp*.jsrun in JIT and--useRegExpJIT=falsemode. 294 pass in both modes.regexp-bol-optimize-out-of-stack.jsandregexp-quantify-atom-copy-term-out-of-stack.jspass when run without their$memoryLimitedheader option. The three that fail do so identically on ajscbuilt from the fork's main before this merge (theautobuild-preview-pr-525-998a2251-debug-asanprebuilt):regexp-boundary-assertions.jsandregexp-buffer-boundaries-anchoring.jsneed upstream's--useRegExpBufferBoundaries, which the fork's Yarr does not have, andregexp-unicode-code-unit-read-for-bmp-terms.jsline 20 (a sticky/umatch started on a trail surrogate), where the fork matches the surrogate pair as V8 does.jsc(theUnlinkedMetadataTable.cppconflict): everybytecode-cache-*.js, every top-levelJSTests/modulestest (-m) and 300 randomJSTests/stresstests, each run plain with--diskCachePath(writes the cache), then with--forceDiskCache=true(must decode), then with--diskCachePayloadIsPersistentForTesting=trueas well, outputs compared. 82 files declare their own options and were skipped; 310 pass all three ways. The 18 that fail do so identically in all three modes, so none is a cache problem: 8 module tests that check the fork's error wording or import-attribute handling (aliasing,different-view,fallback-ambiguous,import-attributes-unsupported,import-error,indirect-export-error,module-is-strict-code,namespace-error, all failing the same way on the pre-merge prebuiltjsc), 8 Intl tests (the prebuiltlibicudata.athis machine links is the per-item zstd-compressed one that only Bun'sbun_icu_maybe_decompresshook can read; the sameIntlcalls succeed in the Bun built against this tree),has-indexed-property-slow-put-array-storage-ftl.js(needsrunFTLNoCJIT) anditerator-error-messages-consistent.js(fork error wording). No decode failure, checksum mismatch or crash.bun run build:local: Bun (maind64a03fadcplus compile: pre-register embedded modules without allocating loader promises bun#40674, which pins the fork'sf5deafe090, plus themoduleLoaderFetchparameter) links and runs against this tree.test/js/bun/jsc/webkit-upgrade-6b879687ee.test.tspins three engine behaviors from this range that crash or miscompile on the current pin and passes. Suites run on that debug + ASAN build:test/js/bun/jsc,bun/jsc-stress(146/146),node/events,node/util,node/vm,node/module,bun/resolve,node/worker_threads,bun/wasm,web/url(1305/1305),web/atomics,web/temporal,web/intl,web/workers,node/string_decoder,bundler/bundler_compile,bundler/bun-build-api,bundler/bun-build-compile: 3,719 pass. Every failure is one of: a 5 s (or per-test) timeout under debug + ASAN that passes with a longer timeout (the DOMJIT warm-up loops,parseArgsstress,util.inspect,vm.Scriptleak check, worker termination, the twobun-build-apibytecode tests,bun-build-compile's--compile --bytecodecases; the compiled-executable aliasing check was run by hand: 4000 decoded functions keep 12.7 MB out of anonymous memory), a test that fails the same way on a debug build at the current pin (compile/HelloWorldWithProcessVersionsBun, the worker "message flood" timing check, and the ASAN-onlyterminate() while dns.lookup()test, which fails on LeakSanitizer for anode_fs_binding::Bindingthat main already leaks), or a cascade from one of those (the cross-processstructured-clonechild).Upstream changes
Each commit appears once under the most specific heading that applies. Commits whose only engine-side footprint is a WebCore/WebKit preference entry, an xcconfig, a safer C++ expectations list, or Cocoa/GTK/WPE/Swift-only code that the JSCOnly port does not compile are listed at the end.
Needs a Bun-side change
c8fdf5eb81[API] [BEHAVIOR]: the module fetch hook receives the referring script's base URL.GlobalObjectMethodTable::moduleLoaderFetchis nowJSPromise* (*)(JSGlobalObject*, JSModuleLoader*, JSValue key, const String& referrer, RefPtr<ScriptFetchParameters>, RefPtr<ScriptFetcher>),JSModuleLoader::fetchandloadModuletake the samereferrer,hostLoadImportedModulepasses the referring module's key for static descendants andrequestImportModulepasses the importing module's key for dynamicimport(). A Symbol key (inline module) yields the empty string, a null string means no referring script. WebCore uses it to send the spec-correctRefererheader; inside JSC nothing JS-visible changes. Bun:ZigGlobalObject.h:195and:853,ZigGlobalObject.cpp:3649and:3893(three forwarding calls),runtime/bake/BakeGlobalObject.cpp:130(two forwarding calls) gain the parameter; the method tables need no edit once the signatures match, andNodeVM.cppstoresnullptr. Bun ignores the value for now.API and ABI changes
0c7e7ad97b[API]:wtf/Expected.his now#include <expected>plustemplate<class T, class E> using Expected = std::expected<T, E>;andunexpect = std::unexpect; the in-treestd::experimental::fundamentals_v3::expected(378 lines) is gone.std::expectedis stricter:return { { lvalue } }no longer compiles, assignment requiresis_nothrow_move_constructible_v<T> || is_nothrow_move_constructible_v<E>(soRef(Ref&&)andRefPtr(RefPtr&&)are nownoexcept, which makesStringandExceptionnothrow-move-constructible), andvalue()requires a copy-constructibleE(NativePromiseuses*result).makeUnexpected(StdLibExtras.h:1613) already returnedstd::unexpected. Bun'sExceptionOr.h(Expected<T, Exception>),webcore/JSDOMConvertResult.h,webcore/CallbackResult.handInspectorLifecycleAgent.cppsatisfy the new constraints and compile unchanged; Bun builds with-std=gnu++23.f057e7bc12,54b9fc03d8,44d3c5c94d[API]:WTF::ScopedLambdagains an implicit converting constructor from any invocable (LIFETIME_BOUND, no copy), so a callee takingconst ScopedLambda<Sig>&accepts a bare lambda;scopedLambda<Sig>(),scopedLambdaRef<Sig>(),ScopedLambdaFunctorandScopedLambdaRefFunctorare removed;ScopedLambdais now non-copyable and non-movable (a copy could outlive the lambda it points at); the constraint excludesScopedLambdaitself to fix a clang 18 to 20 recursion.LazyFireDetailowns its functor, andJSC::initialize,Options::initialize,VMManager::forEachVM,Heap::forEachCodeBlock,ParkingLot::parkConditionallyand friends pass lambdas directly. Bun's only indirect use isJSC::initialize([&] { ... })(ZigGlobalObject.cpp:301), unchanged.140ec9c4a1[API]:wtf/TypeTraits.hreplaces the SFINAE structsHasRefPtrMemberFunctions<T>,HasWeakPtrFunctions<T>,HasThreadSafeWeakPtrFunctions<T>,HasCheckedPtrMemberFunctions<T>with C++20 concepts of the same names (X<T>::valueno longer compiles) and removesLooksLikeRCSerialDispatcher,SFINAE_OVERLOAD*anddetail::SFINAE1*. Bun does not reference any of them.a90ff51d22[API] [FIX]:ThreadSafeWeakPtr<T>andThreadSafeWeakRef<T>drop theTaggingTraitstemplate parameter andsetTag()/tag(), and store a control block pointer, anint16_tobject offset and aLock(copy, move, assign andget()lock), so mutating one weak pointer from several threads is safe. Upstream's microbenchmark: 1M construct+get from 8.4 ms to 19.4 ms. Bun'sThreadSafeWeakPtr<MessagePort>(webcore/MessagePort.cpp,MessagePortPipe.h) andThreadSafeWeakPtr<BroadcastChannel>(BunBroadcastChannelRegistry) use the single template argument and compile unchanged.4d79cb17cc[API] [FIX]: adds virtualVM::ClientData::reconcileWeakReferencesAtGCEnd(VM&, CollectionScope)with an empty default, called fromHeap::reconcileWeakReferencesAtGCEnd()after marking, so an embedder can reconcile weak references ofErrorInstancesubclasses it keeps in its own IsoSubspaces (WebCore'sJSDOMException). Bun'sJSVMClientDatainherits the default; Bun'sJSDOMExceptionis aJSDOMWrapper, not anErrorInstance.045a0c6379[API] [BEHAVIOR]:ErrorInstance::finishCreation(VM&, StackTraceCapturePolicy)andStackTraceCapturePolicyare replaced byfinishCreationForEmbedderError(VM&)andsetErrorInfoForEmbedderError(LineColumn, String&& sourceURL, String&& stackString);StructuredCloneTags.hbumpsCurrentMajorVersion15 to 16. The JS-visible part (DOMException.stack) lives in WebCore. Bun'sSerializedScriptValue.cppkeeps its ownCurrentVersion = 14and Bun does not reference the removed names.f6a959b7e8[API] [PERF]: removesCodeBlock::valueProfileLock()and theConcurrentJSLocker¶meter fromValueProfileBase::computeUpdatedPrediction,CodeBlock::valueProfilePredictionForBytecodeIndex,updateAllNonLazyValueProfilePredictions,updateAllLazyValueProfilePredictionsandLazyOperandValueProfileParser::prediction;DFG::ByteCodeParser::injectLazyOperandSpeculationno longer takes the CodeBlock lock. Bun does not reference these.57d983744d[API] [PERF]:StructureCache::emptyStructureForPrototypeFromBaseStructuregains a defaultedShouldCacheStructureparameter;createEmptyStructureskips the hash lookup when!prototype->mayBePrototype(), andInternalFunctionAllocationProfiledoes not cache the first structure (it is memoized inFunctionRareData). Bun's twentyemptyObjectStructureForPrototypecallers and itsInternalFunction::createSubclassStructurecallers see unchanged signatures.d9d2fbd881[API] [PERF]: Darwin arm64 core detection.hwNumberOfP0Cores()/P1/P2are replaced byCoreCategory { Super, Performance, Efficiency }andhwNumberOfCores(CoreCategory), read fromhw.perflevelN.name; on M5 Pro/Max the old code counted Performance cores as efficiency cores.numberOfGCMarkersand the macOS low-core DFG/FTL threshold scaling follow. Options renamed:numberOfSuperAndPerformanceCoresOverride,dfgThresholdScaleForFewPerformanceCores,ftlThresholdScaleForFewPerformanceCores. Changes GC marker count and JIT thresholds for Bun on Apple silicon; Bun does not reference the symbols.f479ae9f53[API] [PERF]:Wasm::TypeInformation::tryCleanup()is private;requestCleanup()sets a flag fromJSWebAssemblyModule::destroy()andcleanupIfRequested()runs inHeap::runCollectionEpilogue,sweepSynchronouslyandlastChanceToFinalize, so the global Wasm type registry is swept once per GC cycle instead of per module destruction. Bun does not referenceTypeInformation.7d867192b7[API] [FIX]:B3::Procedure::backwardsDominators()becomesJS_EXPORT_PRIVATEas part of the BackwardsGraph fix below.436d708da9,cbf0ef68ad[API] [INFRA]:wtf/CompletionHandler.hgains Swift bridging (SwiftClosureInvoke/SwiftClosureDestroy, a__swift__-only constructor andpassArgumentToSwift),WTF::VoidCompletionHandlerandWTF::BoolCompletionHandleraliases,WTF_NONNULL/WTF_NULLABLEannotations, and deletes the Objective-C block constructor on Apple;OptionSet.hwidens afriendfor a compiler bug. Bun includes the header (ScriptExecutionContext.h,webcore/SerializedScriptValue.cpp) and uses none of this.3e6559f2f3[INFRA]:wtf/MemoryPressureHandler.haddsusing WTF::MemoryPressureHandlerConfiguration;for WebKit IPC serialization. No Bun reference.Behavior changes and correctness fixes
752ab90072[FIX] [BEHAVIOR]:ArrayPatternNode::bindValueandObjectPatternNode::bindValuecheckisSafeToRecurse()and emit a RangeError. A destructuring pattern nested a few thousand levels deep passed the parser's recursion guard and overflowed the native stack during bytecode generation (SIGSEGV). Pinned by the companion Bun PR's test.33876268a1[FIX]: an AbsencePropertyConditionnow consults a structure's non-reified static property table (hasNonReifiedStaticProperties()plusfindPropertyHashEntry), asAbsenceOfSetEffectalready did. The DFG could foldsymbolObject.description(a staticSymbol.prototypeproperty) toObject.prototype.description's value. Ten Bun classes useHasStaticPropertyTablewithout reifying (BunProcess,JSBuffer,JSEvent, theProcessBinding*objects,JSNodeHTTPServerSocketPrototype) and were exposed to the same misfold. Pinned by the companion Bun PR's test.9f3eea6f46[FIX]:DFGFixupPhaseclearedNodeMustGenerateon Int32/Int52ArithMul,ArithDiv,ArithMod,ArithNegateandArithAbseven withCheckOverfloworCheckOverflowAndNegativeZeroselected, so the AI proved the result Int32, folded(y | 0) === yto true, and DCE deleted the node with its check. Now only theArith::Uncheckedbranches clear the flag. Pinned by the companion Bun PR's test (the old engine returnstruefor65536 * 65536being an int32).03a07e4200[FIX]:DFGIntegerRangeOptimizationPhaseflipped checkedArithAbs/ArithAdd/ArithSub/ArithMultoUncheckedusing range proofs from other checked nodes without recording the dependency, so DCE could later delete the proving checks.rangeFor()now returnsRangeBound { value, proof }pairs andpinRangeBounds()setsNodeMustGenerateon the nodes behind each proof before a flip.8283d4f127[FIX]: DFGsetIntTypedArrayLoadResultfor a boxed Uint32Array load typedSpecInt32Onlyby the AI emittedconvertUInt32ToDouble+boxDouble; consumers relying on the Int32 proof read a boxed double. Now it speculates< 0with anOverflowexit and boxes an int32, matching FTL.cb05a6083a[FIX]:DFGConstantFoldingPhasere-runs the abstract interpreter after foldingGetScopeof a freshNewFunction-family node toIdentity, so the node'sAbstractValueis not left at a stale bottom value that made later phases treat it as unreachable.1d5c10e2f9[FIX]:B3ReduceStrength::specializeSelect()deletedChecks thatPureCSEstill indexed (Checks are pure-keyed), leaving a danglingValue*read byPureCSE::findMatch. NewPureCSE::remove(const ValueKey&, Value*)is called beforedeleteValue. Affects FTL and Wasm OMG.7d867192b7[FIX]:WTF::BackwardsGraphused one worklist for synthetic-root membership and the predecessor flood, so a back-edge source already visited through another back-edge was dropped from the root successors.B3::BackwardsDominatorsthen claimed a block post-dominated a loop pre-header and LICM hoisted a control-dependent load. The same template backsDFGBackwardsCFG.7920db18a5[FIX]:virtualForWithFunctionnow records anInternalFunctioncallee andoperationPolymorphicCall/llint_polymorphic_callonly calllinkPolymorphicCallwhen the callee cell is non-null, becausehandleHostCallcan run JS (a Proxyapplytrap) that fires a watchpoint and frees theCallLinkInfo(use after free). AnInternalFunctioncallee now keeps the IC polymorphic instead of downgrading it to virtual.8f229fb729[FIX] [BEHAVIOR]: Wasm validator security fix. TheEndof every structured control instruction forces the block's declared result types onto the expression stack, not onlyif/else; atry/catchdeclaredanyrefwhose fallthrough arm left(ref $array)kept the subtype and a followingref.test/ref.castwas folded away, so a non-cell externref from the other arm caused type confusion.4002a938c8[FIX]: Wasm multi-memory use after free. Growing a shared memory refreshed every anchored instance's cached memories, including non-shared siblings whose handles the owning thread may have just freed. NewJSWebAssemblyInstance::updateMatchingCachedMemoriesConcurrently(const SharedArrayBufferContents&)refreshes only the slots backed by the grown memory. Relevant to Bun workers that share aWebAssembly.Memory.9a17cd1100[FIX]: OMG inlining a SIMD callee into a non-SIMD root did not mark the B3Procedureas using SIMD (setUsesSIMD(), renamed fromsetUsessSIMD()), so Air spilled and shuffled FP registers at scalar width and corrupted externref results. Applies to Bun's x64 and arm64 Wasm SIMD.97df94ead0[FIX] [API]:UnlinkedMetadataTable::finalize()computes offsets withCheckedUint32and returnsbool;UnlinkedCodeBlockGenerator::finalizereturnsboolandBytecodeGenerator::generatereportsParserError::OutOfMemoryon overflow. A function with very many metadata-bearing opcodes could overflow the 32-bit offsets. See the conflict resolution above. Bun does not call eitherfinalize.1afb343a6d[FIX]:WTF::HighPriorityThreads(Linux) no longer derives fromCanMakeWeakPtr; the GLib RealtimeKit proxy timer uses a lambda over the singleton instead of aWeakPtrbound to the first high-priority thread. GLib only; Bun's JSCOnly build usesEVENT_LOOP_TYPE=Bun.d3699b5838[FIX]:Logger::Observer::~Observer()asserts the observer is no longer registered (assertIsNotRegistered()); the fix proper is WebCore'sMediaSourceremoving itself. Bun defines noLogger::Observer.2ca559226b[PERF] [BEHAVIOR]: Temporal chinese/dangi calendars:advanceToNextLunisolarMonthjumps to day 29 and walks at most 3 days, with two lock-protected process-global memo tables (lunisolarWalkMemos,lunisolarMonthLengthMemos). Upstream: temporal-plain-month-day-lunisolar-month-code 14785 to 224 (66x). Bun enables Temporal; results are unchanged.Performance
48985e195c[PERF] [API]: DFGVariableEventStreamis a byte stream (tag byte plus LEB128 payloads) with a side table of Reset offsets;VariableEventStreamBuilder::finalize()returns the stream and OSR exit stream indices become byte offsets. Newwtf/LEBEncoder.h,LEBDecoder.hgainsdecode*OrCrash. Upstream on JetStream3: 66.6 MB to 17.8 MB for the event streams (-73%), +0.5 us perreconstruct(). Bun does not reference these.580b6dade2[PERF]: FTLOSRExitDescriptor::m_valuesbecomesOSRExitValues, a tag+payload byte stream with run-length encoded dead values and a shared constants table;OSRExitDescriptor::values(const JITCode&)decodes at exit-stub compile time. Upstream: 86 MB to 4.77 MB (-94.5%) across 5,455 FTL compiles, 122 ns encode and 104 ns decode per descriptor.24f0a33655[PERF] [FIX]:JSString::isDefinitelyAtom()uses the per-cell type-info bit, set on construction from an atom and bymarkAsAtom()/swapToAtomString()/convertToNonRope()after a fence. Value profiling (speculationFromValueForProfiling) reads the bit instead of dereferencing the StringImpl, which removes a memory-ordering hazard for concurrent compiler threads;AssemblyHelpers::branchIfNotAtomStringImpllets Baseline, DFG and FTL skip the rope andflagIsAtomchecks.ValueProfileBase::classInfo(unsigned)is deleted. NoCachedTypeschange.57d983744d,bc2c8875fc[PERF]: see above for theStructureCacheskip;LINK(OpInstanceof)is added toCodeBlock::finishCreation, so the LLInt caches theSymbol.hasInstanceload (upstream: instanceof microbenchmarks 1.4x to 2.3x faster withuseJIT=false). Authored by Bun's Sosuke Suzuki.c9740e5b2b[PERF]:@copyDataProperties(object rest destructuring) triesobjectCloneFastwhen the target is empty and there is no excluded set, likeObject.assignsince 319645@main. Upstream: object-rest-clone 1.47x faster.2b0e50239a,1330d5747e,80fc868e73,0a67a6646c,ba84b36bc6[PERF]: MacroAssembler peepholes. The megamorphic cache hash usesaddUnsignedRightShift32(oneadd ..., lsr #8on arm64); unsignedAbove/BelowOrEqualcompares against zero becomecbz/cbnzortest(99.4% of 65,764 sites are the unfenced write barrier, about 263 KB of JetStream3 JIT code);add/subof a zero immediate become amovor nothing (the x86_64 flag write disappears for zero immediates; the fork's YarrJIT does not rely on flags from these entry points, and its tests pass). The Baselineldppairing of adjacent metadata loads (0a67a6646c) was reverted in-range byba84b36bc6(a speculative 1% JetStream3 regression), net zero.b5928f9be1,5bbcf5a4c9,798b6ba2bd[PERF]: Wasm. ThewasmToWasmimport stub loadstargetInstanceandentrypointLoadLocationwith oneloadPairPtr;table.sizeis emitted inline in BBQ and OMG;table.geton externref/anyref tables is inlined in BBQ and OMG (funcref tables still call out). AddsExternOrAnyRefTable::offsetOfJSValues().041ad12a18,f198e8af3b,f69aff0fba,2eedeabcb7,f733e45e7f[PERF]: GC.MarkedBlock::Handle::stopAllocatingiterates free-list intervals (FreeList::forEachInterval), bulk-clears and bulk-setsm_newlyAllocatedwith newBitSet::clearEachNthBit/setEachNthBit(one store per word), and skips zapping for cells that need no destruction;BitSet::concurrentTestAndSet/ClearuseexchangeOr/exchangeAnd(ldset/ldclron arm64 LSE); a finished bonus visitor task signals a dedicated condition instead of waking every parallel marker;SlotVisitor::drainFromSharedno longer broadcasts termination from the thread that observed it.SlotVisitor::waitForTerminationis removed. Bun usesWTF::BitSet(StrongRootBlock.h,EncodeURIComponent.cpp) but not these methods.ecc99e5029,96b1030b8d[PERF]: Air compile time.FixObviousSpillsskips empty states and instructions without spill slots; the Greedy register allocator caches clobber sites per program point and enumerates Tmps withforEachTmpFast.96b1030b8dalso fixesPrintSpecial::forEachArgreporting no args (liveness ended printed Tmps early) and drops unusedPrintSpecialaccessors. The fork's clang-clCostcomparison workaround inAirAllocateRegistersByGreedy.cppis unaffected.Build and infrastructure
82220a2f11[INFRA]: CMake stops rewriting swiftc arguments. For every port including JSCOnly:add_definitions(-DBUILDING_WITH_CMAKE=1 ...)becomeswebkit_add_compile_definitions(...),-fuse-ld=lld,--gc-sections,--disable-new-dtags,--gdb-index, LTO-flto=,--no-keep-memory, the sanitizer flags and--no-undefined(now SHARED/MODULE targets only) move toadd_compile_options/add_link_options, andENABLED_COMPILER_SANITIZERSis built in the sanitizer loop instead of a regex overCMAKE_CXX_FLAGS. The effective flags are unchanged; the fork's Windows ASAN hunk is ported (see the conflict above).bun run jsc:build:debugis the check.1fec4985d1[INFRA]: GCC floor raised to 13.1.0 (libstdc++ 13.1 for C++23std::format); the GCC < 12 warning block and thejit/JIT.husing enum WriteBarrierModeworkaround are removed. Bun builds with clang.f69625842f[INFRA]:wasm/WasmAddressType.hguards theB3::Typeconversions withENABLE(JIT)forENABLE_JIT=OFFbuilds. Bun builds with JIT on.b13574b29b,e6f6ed997e,23d9fb2bf1,5c7edee974[INFRA]: safer C++ analyzer annotations only:DefaultWeakPtrImpl::deref()and theLock/UnfairLock/WordLockmethods getNODELETE,memcpySpangetsNODELETE,FlatteningVariantAdaptor::switchOngetsNOESCAPE. Empty on MSVC and older clang; Bun'sWTF::LockandmemcpySpanuses compile unchanged.f918fec1e1[INFRA]: libpas inlines thePAS_MTE_HANDLEindirections that resolved toPAS_MTE_CLEAR*;pas_mte.hdefines them outsidePAS_ENABLE_MTE. On non-MTE builds (all Bun targets) the sites now mask the top byte, which is already zero.e5c29fb322,118f677663[INFRA]: Mya (an Apple-only memory analyzer) andlibJavaScriptCoreToolswere added withif (APPLE)cmake blocks inSource/JavaScriptCore/CMakeLists.txtandshell/CMakeLists.txt, then reverted in-range. HEAD contains none of it.9fa946d9a7[INFRA]: GLib API cleanup (jsObjectCalltakes a span);ENABLE_JSC_GLIB_APIis off for JSCOnly.Omitted (no JSCOnly footprint)
ada29caa0f,ea3dd8bd98,de94eda046(safer C++ expectations lists);37787f8a4d,34a2ffae86,cb138473ae(UnifiedWebPreferences.yamlentries);f16770926a(xcconfig$(inherited));fa83add634(CocoaRuntimeApplicationChecksCocoa.mm);bc9f768050(Cocoa cmake);c9d8bf6fee(a Cocoa-onlyHAVE_NETWORK_FRAMEWORK_HTTP_MESSAGINGcondition);4e646d190c(Swift-only build scripts);81c94dae4c(a GTK/WPE-onlyENABLE_IPC_TESTING_APIguard).