Repository navigation
Upgrade to upstream WebKit 3722912ff800 - #383
Conversation
https://bugs.webkit.org/show_bug.cgi?id=320479 rdar://183446539 Reviewed by Youenn Fablet. This re-merges 318000@main but with an additional check of __IPHONE_OS_VERSION_MIN_REQUIRED >= 260400 because the ios-safer-cpp bot is still building with the iOS 26.0 SDK, which doesn't have the needed Network.framework symbols. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebTransport.mm * Source/WTF/wtf/PlatformHave.h: * Source/WebKit/NetworkProcess/cocoa/NetworkSoftLink.h: * Source/WebKit/NetworkProcess/cocoa/NetworkSoftLink.mm: * Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.cpp: * Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.h: * Source/WebKit/NetworkProcess/webtransport/NetworkTransportStream.cpp: * Source/WebKit/NetworkProcess/webtransport/NetworkTransportStream.h: * Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm: (WebKit::createParameters): (WebKit::NetworkTransportSession::create): (WebKit::NetworkTransportSession::initialize): (WebKit::NetworkTransportSession::setupDatagramConnection): (WebKit::NetworkTransportSession::createStream): (WebKit::NetworkTransportSession::terminate): (WebKit::NetworkTransportSession::isSessionClosed const): (WebKit::NetworkTransportSession::exportKeyingMaterial): * Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportStreamCocoa.mm: (WebKit::NetworkTransportStream::initializeReadyConnection): (WebKit::NetworkTransportStream::cancelReceive): (WebKit::NetworkTransportStream::cancelSend): * Source/WebKit/Shared/WebPreferencesDefaultValues.cpp: (WebKit::defaultWebTransportEnabled): * Tools/TestWebKitAPI/Helpers/cocoa/NetworkConnection.h: * Tools/TestWebKitAPI/Helpers/cocoa/NetworkConnection.mm: (TestWebKitAPI::Connection::abortReads): (TestWebKitAPI::Connection::abortWrites): (TestWebKitAPI::Connection::setRemoteReceiveErrorHandler): (TestWebKitAPI::Connection::setRemoteSendErrorHandler): (TestWebKitAPI::ConnectionGroup::drainWebTransportSession): * Tools/TestWebKitAPI/Helpers/cocoa/WebTransportServer.h: * Tools/TestWebKitAPI/Helpers/cocoa/WebTransportServer.mm: (TestWebKitAPI::WebTransportServer::isAvailable): Deleted. * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebTransport.mm: (TestWebKitAPI::TEST(WebTransport, ClientBidirectional)): (TestWebKitAPI::TEST(WebTransport, ClientBidirectionalBYOB)): (TestWebKitAPI::TEST(WebTransport, Datagram)): (TestWebKitAPI::TEST(WebTransport, Unidirectional)): (TestWebKitAPI::TEST(WebTransport, ServerBidirectional)): (TestWebKitAPI::TEST(WebTransport, NetworkProcessCrash)): (TestWebKitAPI::TEST(WebTransport, Worker)): (TestWebKitAPI::TEST(WebTransport, WorkerAfterNetworkProcessCrash)): (TestWebKitAPI::TEST(WebTransport, ServiceWorker)): (TestWebKitAPI::CreateStreamsBeforeReady)): (TestWebKitAPI::DISABLED_CSP)): (TestWebKitAPI::ServerCertificateHashes)): (TestWebKitAPI::ServerConnectionTermination)): (TestWebKitAPI::BackForwardCache)): (TestWebKitAPI::ServerDrain)): (TestWebKitAPI::DISABLED_ClientStreamAborts)): (TestWebKitAPI::DISABLED_ServerStreamAborts)): Canonical link: https://commits.webkit.org/318161@main
…buted-string-across-shadow-boundaries tests are constant TEXT failures. https://bugs.webkit.org/show_bug.cgi?id=320539 rdar://182859944 Reviewed by Tim Horton and Abrar Rahman Protyasha. 317100@main ("Refactor Style::ComputedStyleProperties generation") made adjacent NSAttributedString ranges that carry identical attributes coalesce into a single run across shadow boundaries. This is a progression: the runs had byte-identical attributes (font, kern, stroke, color), so merging them into one range is the canonical form -- no attribute value changed. The cross-platform baselines already expected the merged output; only the stale mac-wk1 overrides still held the pre-merge split form. * LayoutTests/platform/mac-wk1/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-1-expected.txt: * LayoutTests/platform/mac-wk1/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-2-expected.txt: * LayoutTests/platform/mac-wk1/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-3-expected.txt: * LayoutTests/platform/mac-wk1/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-4-expected.txt: * LayoutTests/platform/mac-wk1/editing/mac/attributed-string/attributed-string-across-shadow-boundaries-5-expected.txt: Canonical link: https://commits.webkit.org/318162@main
https://bugs.webkit.org/show_bug.cgi?id=320533 rdar://183490993 Reviewed by Yijia Huang. Greedy * or + non-capturing parens in the tail position does not need inter-iteration backtracking state. 1. For * case (term.quantityMinCount == 0) Pattern like /(?:AA|A)*/ can never fail, because * succeeds even with zero iterations. And because it is in the tail position, all backtracking are coming from the greedy matching attempt of (?:AA|A). This means that we will never restore the previous iteration's state to explore a different matching. When we failed in the current iteration, we can just say "the matching is complete" because we are at the terminal position. 2. For + case (term.quantityMinCount == 1) Pattern like /(?:AA|A)+/ will need to match at least once. If we failed in this 1st iteration, since this is the initial iteration, we have no context to restore, and we can simply fail. If we matched once and in the second iteration, if we failed to match, then we also do not need to restore to the 1st iteration since we already succeeded the 1st iteration (and + suffices), and since it is a terminal position, we can just say "the matching is complete" As a result, term.quantityMinCount <= 1 cases never require per-iteration ParenContext when we have these greedy patterns at the terminal position. Thus we can mark them `isTerminal` to skip ParenContext generation as an optimization. On the other hand, term.quantityMinCount >= 2 cannot work in this way. Let's have a RegExp matching `/(?:AA|A){2,}/.exec("AA")`. The right answer is "AA" since "A" and "A" matches with 2 iterations. But this is achieved by restoring the 1st iteration and taking a different alternative "A" instead of "AA". Thus, inter-iteration backtracking state is necessary for this case. Tests: JSTests/stress/yarr-terminal-parentheses-captures.js JSTests/stress/yarr-terminal-parentheses-frame-layout.js JSTests/stress/yarr-terminal-parentheses-min-count.js * JSTests/stress/yarr-terminal-parentheses-captures.js: Added. (shouldBe): (testExec): * JSTests/stress/yarr-terminal-parentheses-frame-layout.js: Added. (shouldBe): (test): * JSTests/stress/yarr-terminal-parentheses-min-count.js: Added. (shouldBe): (test): * Source/JavaScriptCore/yarr/Yarr.h: * Source/JavaScriptCore/yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin): (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd): (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin): * Source/JavaScriptCore/yarr/YarrJIT.cpp: * Source/JavaScriptCore/yarr/YarrPattern.cpp: (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses): * Source/JavaScriptCore/yarr/YarrPattern.h: (JSC::Yarr::BackTrackInfoParenthesesTerminal::entryPositionIndex): Canonical link: https://commits.webkit.org/318163@main
…one device system-wide on every capture start (unconditional VPIO instantiation) rdar://183517329 https://bugs.webkit.org/show_bug.cgi?id=320452 Reviewed by Eric Carlson. To remove microphone interruption when echo cancellation is off, we should disable VPIO prewarming in GPUProcess when not needed. To do so, we compute in WebPageProxy whether we will use echo cancellation from the gum request constraints. We then pass that information via IPC to GPUConnectionToWebProcess::updateCaptureAccess which will prewarm the VPIO unit only if echo cancellation is on. In case of GPU process crash, we lot the info whether echo cancellation is on or off. We do not prewarm the VPIO unit, as this is quite rare and minimising the work on GPU process crash is probably best. Manually tested. * Source/WebCore/platform/mediastream/MediaConstraints.cpp: (WebCore::MediaConstraints::willUseEchoCancellation const): * Source/WebCore/platform/mediastream/MediaConstraints.h: * Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::updateCaptureAccess): * Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h: * Source/WebKit/GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::createGPUConnectionToWebProcess): (WebKit::GPUProcess::updateCaptureAccess): * Source/WebKit/GPUProcess/GPUProcess.h: * Source/WebKit/GPUProcess/GPUProcess.messages.in: * Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::updateCaptureAccess): * Source/WebKit/UIProcess/GPU/GPUProcessProxy.h: * Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.cpp: (WebKit::UserMediaPermissionRequestProxy::willUseEchoCancellation const): * Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::willStartCapture): (WebKit::WebPageProxy::gpuProcessExited): Canonical link: https://commits.webkit.org/318164@main
…ne' sharing groups https://bugs.webkit.org/show_bug.cgi?id=320558 Reviewed by Antti Koivisto. A flex line is at least as tall as each of its baseline-sharing groups, and a group is as tall as its largest ascent plus its largest descent. align-self: baseline and align-self: last baseline align to opposite edges of the line, so they are two separate groups. crossSizeForFlexLines kept the two ascents apart but shared one descent between them, and each group's total read that shared value. So a last-baseline item's descent was added to the first-baseline group's ascent, and the other way round, making the line taller than either group really is. It also made the result depend on the order the items appear in, since a descent only reached the other group once it had been seen. Give the last-baseline group its own descent. Both groups now sum the ascent and descent of their own members. Chrome and Firefox both size these lines correctly. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-baseline-and-last-baseline-groups-line-size-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/flexbox-baseline-and-last-baseline-groups-line-size.html: Added. * Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp: (WebCore::FlexFormattingContext::crossSizeForFlexLines): Canonical link: https://commits.webkit.org/318165@main
https://bugs.webkit.org/show_bug.cgi?id=317022 Reviewed by Keith Miller. recursivelyBuildSwitch picks a jump table when (last - first + 1) / n is below a density limit. When case values span more than 2^63, that subtraction overflows signed int64; the wrapped result can look dense and tableSize becomes enormous, OOMing in BitVector / data-section allocation. Compute the span with CheckedInt64 and skip the table path on overflow. Add a testb3 case with the sparse i64 values from the bug report. * Source/JavaScriptCore/b3/B3LowerMacros.cpp: (JSC::B3::LowerMacros::recursivelyBuildSwitch): Checked span for density. * Source/JavaScriptCore/b3/testb3.h: * Source/JavaScriptCore/b3/testb3_1.cpp: * Source/JavaScriptCore/b3/testb3_5.cpp: (testSwitchSparseI64RangeOverflow): Added. Canonical link: https://commits.webkit.org/318166@main
https://bugs.webkit.org/show_bug.cgi?id=312794 Reviewed by Yusuke Suzuki. Memory64 bulk ops (fill/copy/init) are implemented in OMG, but this stress test disabled OMG with --useOMGJIT=0. Drop that flag so default tiering and wasmTestLoopCount can reach OMG (the path that regressed JetStream3). * JSTests/wasm/stress/memory64-bulk-memory.js: Canonical link: https://commits.webkit.org/318167@main
https://bugs.webkit.org/show_bug.cgi?id=277686 Reviewed by Yusuke Suzuki. BBQ used to emit a full binary search over every br.table index even when long stretches shared the same target. Collapse consecutive identical targets into runs and dispatch with unsigned range checks. Prefer the jump table only when the number of runs is large enough, so dense tables with few runs stay on the shallow path. BinarySwitch takes those runs via a dedicated constructor over span of (caseValue, runLength), rather than overloading the flat span<int64_t> case list. Stress forces BBQ and skips wasm-no-jit / wasm-no-wasm-jit modes, which would set IPInt or BBQ off against the required options. * Source/JavaScriptCore/jit/BinarySwitch.h: * Source/JavaScriptCore/jit/BinarySwitch.cpp: (JSC::BinarySwitch::BinarySwitch): (JSC::BinarySwitch::advance): (JSC::BinarySwitch::buildCheckRuns): * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJIT::addSwitch): * JSTests/wasm/stress/br-table-consecutive-target-runs.js: Added. * JSTests/microbenchmarks/wasm-bbq-br-table-runs.js: Added. Canonical link: https://commits.webkit.org/318168@main
https://bugs.webkit.org/show_bug.cgi?id=142657 <rdar://problem/20149674> Reviewed by Yusuke Suzuki. Rather than trying to keep a manual list, leverage the pretty format of IDL to autogenerate `WI.NativeConstructorFunctionParameters` and `WI.NativePrototypeFunctionParameters`. * Source/WebCore/bindings/scripts/CodeGenerator.pm: (ProcessInterfaces): (WriteInspectorNativeFunctionParameters): Added. Modify the IDL parser to output `*.inspector-native-function-parameters.json` files containing a pretty string of the arguments for any class-level and instance-level methods. * Source/WebCore/bindings/scripts/combine-inspector-native-function-parameters.pl: Added. Combine all `*.inspector-native-function-parameters.json` into a single `InspectorNativeFunctionParameters.json`. * Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js: Removed. * Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters-overrides.json: Added. Pure JS APIs do not have anything like pretty formatted IDL to draw from like other web APIs. Instead, have these be handwritten in a JSON file until a solution can be found for them. This also allows for Web Inspector to override anything that is automatic if needed. * Source/WebInspectorUI/Scripts/update-NativeFunctionParameters.py: Added. Merge the `InspectorNativeFunctionParameters.json` with the overrides file and generate `NativeFunctionParameters.js`. If WebCore's generated JSON cannot be read or parsed, warn and generate an overrides-only file rather than failing the build, since these parameter names are only a minor visual enhancement. * Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl: Read `InspectorNativeFunctionParameters.json` from WebCore's private headers and copy `NativeFunctionParameters.js` alongside all other resources. * Source/WebInspectorUI/UserInterface/Views/ObjectTreePropertyTreeElement.js: (WI.ObjectTreePropertyTreeElement.prototype._functionParameterString): Drive-by: also handle `Atomics`, `Intl`, and `WebAssembly` namespace objects. * Source/CMakeLists.txt: * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources.make: * Source/WebCore/DerivedSources-output.xcfilelist: * Source/WebCore/WebCoreMacros.cmake: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebInspectorUI/CMakeLists.txt: * Source/WebInspectorUI/WebInspectorUI.xcodeproj/project.pbxproj: Generate and consume the parameter data in each build system. Export `InspectorNativeFunctionParameters.json` as a WebCore private header and consume it from `WEBCORE_PRIVATE_HEADERS_DIR`, matching the existing `InspectorBackendCommands.js` pattern. This avoids a cross-project target dependency, which cannot be satisfied when WebInspectorUI is built standalone against installed WebKit. Depend on `WebCore_CopyPrivateHeaders` in CMake and add `WebCore.framework` to Xcode's `Product Dependencies` build phase so combined builds still order WebCore before WebInspectorUI. * Source/WebCore/bindings/scripts/test/JS/TestCallTracer.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestCallbackInterface.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestConditionalIncludes.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestDOMJIT.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestDomainSecurity.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestEnabledBySetting.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestEventTarget.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestGlobalObject.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestIndexedSetterWithIdentifier.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestInterface.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestLegacyOverrideBuiltIns.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestNamedAndIndexedSetterWithIdentifier.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestNamedDeleterWithIdentifier.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestNamedGetterWithIdentifier.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestNamedSetterWithIdentifier.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestNamedSetterWithIndexedGetter.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestNamedSetterWithIndexedGetterAndSetter.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestNamespaceObject.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestObj.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestScheduledAction.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestSerializedScriptValueInterface.inspector-native-function-parameters.json: Added. * Source/WebCore/bindings/scripts/test/JS/TestTypedefs.inspector-native-function-parameters.json: Added. Canonical link: https://commits.webkit.org/318169@main
…struction https://bugs.webkit.org/show_bug.cgi?id=310640 rdar://problem/173252605 Reviewed by Abrar Rahman Protyasha Remove construction of ISO-18013 request info * Source/WTF/wtf/PlatformEnable.h: * Source/WebCore/Headers.cmake: * Source/WebCore/Modules/identity/DigitalCredentialsMobileDocumentRequestDataWithRequestInfo.h: Removed. * Source/WebCore/Modules/identity/DigitalCredentialsRequestData.h: * Source/WebCore/Modules/identity/DigitalCredentialsRequestDataBuilder.cpp: * Source/WebCore/Modules/identity/DigitalCredentialsRequestDataBuilder.h: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebKit/Shared/WebCoreArgumentCodersAuth.serialization.in: * Source/WebKit/UIProcess/DigitalCredentials/WKDigitalCredentialsPicker.mm: * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/UIProcess/WebPageProxy.messages.in: * Source/WebKit/WebProcess/DigitalCredentials/DigitalCredentialsCoordinator.messages.in: Canonical link: https://commits.webkit.org/318170@main
…s on Linux https://bugs.webkit.org/show_bug.cgi?id=320559 Unreviewed test gardening. The Linux ports (GTK and WPE) build and test on the CI with asserts enabled for Release. This tests are quite slow on a standard release build, but on release+asserts they often timeout completely. On the CI each one of this tests is run several times with different configurations, and at least 15-20 of those runs usually timeout. Each one of those timeouts costs around ~10 minutes (because first it hits the soft timeout and then the hard, so around 5+5) with the CPU spinning like crazy and a worker waiting that can't advance to the next test. * JSTests/wasm/stress/type-index-abstract-heap-types-concrete-vs-abstract.js: * JSTests/wasm/stress/type-index-abstract-heap-types-globals-and-tables.js: * JSTests/wasm/stress/type-index-abstract-heap-types-nulls-and-casts.js: * JSTests/wasm/stress/type-index-abstract-heap-types-subtype-validation.js: Canonical link: https://commits.webkit.org/318171@main
…am before WebTransport.ready should fail if the server closes the connection https://bugs.webkit.org/show_bug.cgi?id=320510 rdar://183471508 Reviewed by Chris Dumez. Like getStats requests, createStream requests need to wait until the session has been initialized either successfully or unsuccessfully before completing. * LayoutTests/imported/w3c/web-platform-tests/webtransport/close.https.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webtransport/close.https.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webtransport/close.https.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webtransport/close.https.any.worker-expected.txt: * Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.cpp: (WebKit::NetworkTransportSession::~NetworkTransportSession): (WebKit::NetworkTransportSession::completeRequestsAfterInitialization): (WebKit::NetworkTransportSession::completeStatsRequestsAfterInitialization): Deleted. * Source/WebKit/NetworkProcess/webtransport/NetworkTransportSession.h: * Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm: (WebKit::NetworkTransportSession::initialize): (WebKit::NetworkTransportSession::createStream): Canonical link: https://commits.webkit.org/318172@main
https://bugs.webkit.org/show_bug.cgi?id=320235 Reviewed by Darin Adler. Now that all <length> and <length-percentage> values can use evaluation time zoom, we no longer have anything that requires style building time zoom. That means its a good time to remove the EvaluationTimeZoomEnabled setting, as we can get the complete benefit from its removal now. Along with removing the setting, all the zoom state on CSSToLengthConversionData can be remove. One place that zoom was still being used was in the theme code when using the version of emToPx that takes a Style::ComputedStyle. Its very unclear from call sites that it is distinct, so a new function, emToPxZoomed was added for those callers, and now the normal emToPx is always unzoomed. There is quite a bit of cleanup in the theme code around zoom that can be done, but that is not handled in this change. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSToLengthConversionData.cpp: * Source/WebCore/css/CSSToLengthConversionData.h: * Source/WebCore/css/parser/SizesAttributeParser.cpp: * Source/WebCore/css/query/MediaQueryEvaluator.cpp: * Source/WebCore/css/values/primitives/CSSPrimitiveNumericRange.h: * Source/WebCore/dom/Document.cpp: * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: * Source/WebCore/html/shadow/TextControlInnerElements.cpp: * Source/WebCore/platform/graphics/FontDescription.cpp: * Source/WebCore/platform/graphics/FontDescription.h: * Source/WebCore/rendering/RenderBlock.cpp: * Source/WebCore/rendering/RenderTheme.cpp: * Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm: * Source/WebCore/rendering/ios/RenderThemeIOS.mm: * Source/WebCore/rendering/mac/RenderThemeMac.mm: * Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp: * Source/WebCore/style/StyleBuilderCustom.h: * Source/WebCore/style/StyleBuilderState.cpp: * Source/WebCore/style/StyleExtractorCustom.h: * Source/WebCore/style/StyleResolveForDocument.cpp: * Source/WebCore/style/StyleResolveForFont.cpp: * Source/WebCore/style/computed/StyleComputedStyleBase+GettersInlines.h: * Source/WebCore/style/computed/StyleComputedStyleBase+SettersInlines.h: * Source/WebCore/style/computed/StyleComputedStyleBase.h: * Source/WebCore/style/computed/StyleComputedStyleProperties+InitialCustomInlines.h: * Source/WebCore/style/computed/data/StyleInheritedRareData.cpp: * Source/WebCore/style/computed/data/StyleInheritedRareData.h: * Source/WebCore/style/values/backgrounds/StyleLineWidth.cpp: * Source/WebCore/style/values/backgrounds/StyleLineWidth.h: * Source/WebCore/style/values/inline/StyleLineHeight.cpp: * Source/WebCore/style/values/non-standard/StyleWebKitTextStrokeWidth.cpp: * Source/WebCore/style/values/primitives/StyleLengthResolution.cpp: * Source/WebCore/style/values/primitives/StyleLengthResolution.h: * Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.cpp: * Source/WebCore/style/values/primitives/StylePrimitiveNumericTypes+Conversions.h: * Source/WebCore/style/values/sizing/StyleContainIntrinsicSize.cpp: * Source/WebCore/style/values/text/StyleLetterSpacing.cpp: * Source/WebCore/style/values/text/StyleWordSpacing.cpp: * Source/WebCore/style/values/transforms/StylePerspective.cpp: * Source/WebCore/style/values/transforms/StyleTransformFunction.cpp: * Source/WebCore/svg/SVGLengthContext.cpp: * Source/WebCore/svg/SVGLengthContext.h: Canonical link: https://commits.webkit.org/318173@main
…ration https://bugs.webkit.org/show_bug.cgi?id=320554 rdar://problem/183517726 Reviewed by Aditya Keerthi. This method is not implemented (or called) anywhere, so let's remove the declaration. * Source/WebKit/WebProcess/WebPage/WebPage.h: Canonical link: https://commits.webkit.org/318174@main
https://bugs.webkit.org/show_bug.cgi?id=320511 rdar://problem/183473145 Reviewed by Alan Baradlay. A negative grid line counts backward from the end edge of the explicit grid: for a grid with N explicit tracks, -1 is the last line and -(N+1) is the first line, with more-negative values counting past the start edge into the leading implicit grid. Previously explicitLineToIndex() passed negative lines through unchanged (e.g. -1 stayed -1), which is not quite how they are supposed to get resolved. To fix this we can just thread in the number of explicit tracks through the code that computes the UnplacedGridItem's GridPosition so that it takes the number of explicit tracks into account. For example, if you have three expliti columns with lines L1 L2 L3 L4, then -1 will map to L4 and -5 will map to the first implicit track that is created right before the first explicit one. * Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp: (WebCore::Layout::GridFormattingContext::constructUnplacedGridItems const): * Source/WebCore/layout/formattingContexts/grid/UnplacedGridItem.cpp: (WebCore::Layout::explicitLineToIndex): This is what does the mapping as described above. This means that this may still return a negative number for those lines that are part of the implicit grid that is part of the beginning. That is ok though since those will be translated and be relative to the implicit grid when we actually create the GridPosition itself. (WebCore::Layout::UnplacedGridItem::GridPosition::create): This is where the line numbers will get transformed to be relative to the implicit grid. So here -5 from the example above would be fed in as -1 but then transformed into 0 since it is the first line in the implicit grid. (WebCore::Layout::UnplacedGridItem::resolveDefinitePosition): Plumb the number of explicit tracks to explicitLineToIndex so that the values take them into consideration like described above in the explanation of the function. Canonical link: https://commits.webkit.org/318175@main
…rigin.y https://bugs.webkit.org/show_bug.cgi?id=320548 rdar://183507280 Reviewed by Mike Wyrzykowski and Aditya Keerthi. Fix the typo and rebaseline the impacted tests. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ios/CALayerTreeAsText.mm * LayoutTests/compositing/background-color/background-color-clamping-expected.txt: * LayoutTests/interaction-region/guard-crash-expected.txt: * LayoutTests/interaction-region/interaction-layers-culling-layer-type-change-expected.txt: * LayoutTests/interaction-region/layer-tree-expected.txt: * LayoutTests/interaction-region/layer-tree-shape-reset-expected.txt: * LayoutTests/platform/ios/compositing/background-color/background-color-clamping-expected.txt: * LayoutTests/platform/visionos/transforms/separated-expected.txt: * Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm: (dumpCALayer): (-[WKWebView _propertiesOfLayerWithID:]): * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ios/CALayerTreeAsText.mm: Added. (TEST(WebKit, CALayerTreeAsTextDumpsYCoordinates)): Add an API test similar to the one from 317839@main. Canonical link: https://commits.webkit.org/318176@main
…ringe in vertical writing modes. https://bugs.webkit.org/show_bug.cgi?id=320538 rdar://183496114 Reviewed by Alan Baradlay. For vertical writing modes, TextBoxPainter paints the highlight background fill inside a rotated graphics context whose translation is derived from an inline-axis coordinate that is intentionally not device-pixel aligned (to preserve glyph advances). A fill snapped to integers in the box's local space therefore lands on fractional device pixels and gets anti-aliased, leaving a one-pixel fringe that an ordinary unrotated element background does not have. Fix this by snapping the fill rect in device space for vertical writing modes. imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-vertical-writing-mode-001.html * LayoutTests/TestExpectations: * LayoutTests/platform/ios/TestExpectations: * Source/WebCore/rendering/TextBoxPainter.cpp: (WebCore::TextBoxPainter::paintBackgroundFillForRange): Canonical link: https://commits.webkit.org/318177@main
https://bugs.webkit.org/show_bug.cgi?id=175181 Unreviewed test gardening. * WebDriverTests/TestExpectations.json: Canonical link: https://commits.webkit.org/318178@main
https://bugs.webkit.org/show_bug.cgi?id=320491 rdar://183457853 Reviewed by Yusuke Suzuki. This patch fixes the path run-regexp-tests tries to chdir to. * Tools/Scripts/run-regexp-tests: Canonical link: https://commits.webkit.org/318179@main
…FlexItem's unreachable fallback https://bugs.webkit.org/show_bug.cgi?id=320572 Reviewed by Antti Koivisto. flowAwareMarginBeforeForFlexItem returns a margin of the flex item, but the fallback after its switch returns one of the flex container's. The four flow-aware accessors next to it are container-level, so returning flexBox().marginTop() is right for them and was carried over to this one. * Source/WebCore/layout/formattingContexts/flex/FlexFormattingUtils.cpp: (WebCore::FlexFormattingUtils::flowAwareMarginBeforeForFlexItem const): Canonical link: https://commits.webkit.org/318180@main
… container is sized to min-content https://bugs.webkit.org/show_bug.cgi?id=320564 Reviewed by Antti Koivisto. computeIntrinsicLogicalWidths measures a flex item's margins once and adds the same value to both the min-content and the max-content width. The two are measured over different sets of flex lines, though: max-content puts every item on one line, while min-content for a wrapping container puts a break between every item, so each one is alone on its line. margin-trim takes the inline margins of the items at the start and end of a line. On the single line max-content measures there are two such items; on the min-content lines every item is one, at both ends. RenderFlexibleBox trims the margins of the container's first and last flex items before layout, which is the right answer for max-content and feeds the same number into min-content, where it leaves every interior item contributing margins that will not be there. So a container that sizes to min-content reports a width wider than the content it then lays out. Three 50px items with 100px inline margins and margin-trim: inline-start inline-end come out 250px wide when the same container's layout puts each item alone on its line at 50px with both margins gone, leaving 200px of the container empty. Take the margins off the min-content contribution of every item when the container wraps and the corresponding side is trimmed. Column flow keeps its existing behaviour: its min-content is a max over items in the cross axis, not a per-line break. * LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/flex-min-content-trims-every-line-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-box/margin-trim/flex-min-content-trims-every-line.html: Added. * Source/WebCore/rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths const): Canonical link: https://commits.webkit.org/318181@main
…yncData types https://bugs.webkit.org/show_bug.cgi?id=320517 rdar://183482026 Reviewed by Brady Eidson. Sometimes it's desirable to log said data close to their IPC send/receive methods, where they are usually bundled as ProcessSyncData types. As such, this patch teaches generate-process-sync-data.py to create TextStream operator<< overloads for said types. We also regenerate the TestSyncData output, which had drifted from the generator after 312295@main and 316357@main; each of those commits altered the script without regenerating these baselines. * Source/WebCore/Scripts/generate-process-sync-data.py: (generate_synched_data_header): (generate_synched_data_header.TextStream): (generate_synched_data_impl): * Source/WebCore/Scripts/tests/TestSyncClient.cpp: (WebCore::TestSyncClient::broadcastAudioSessionTypeToOtherProcesses): (WebCore::TestSyncClient::broadcastMainFrameURLChangeToOtherProcesses): (WebCore::TestSyncClient::broadcastIsAutofocusProcessedToOtherProcesses): (WebCore::TestSyncClient::broadcastUserDidInteractWithPageToOtherProcesses): (WebCore::TestSyncClient::broadcastAnotherOneToOtherProcesses): (WebCore::TestSyncClient::broadcastMultipleHeadersToOtherProcesses): * Source/WebCore/Scripts/tests/TestSyncData.cpp: (WebCore::TestSyncData::update): (WebCore::operator<<): * Source/WebCore/Scripts/tests/TestSyncData.h: * Source/WebCore/Scripts/tests/TestSyncData.serialization.in: Canonical link: https://commits.webkit.org/318182@main
…redProcessEnabled https://bugs.webkit.org/show_bug.cgi?id=320495 rdar://183460049 Reviewed by Sihui Liu. SiteIsolationSharedProcessEnabled may soon be enabled by default. While this is a useful performance optimization to complement Site Isolation, it _may_ mask real issues unique to frames in separate processes, since there will be more process re-use now. We should introduce test coverage around this feature, so let's retrofit the EmbeddedPDFHUDSiteIsolation suite for that purpose. * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UnifiedPDFTests.mm: (TestWebKitAPI::EmbeddedPDFHUDSiteIsolation::siteIsolationSharedProcessEnabled const): (TestWebKitAPI::EmbeddedPDFHUDSiteIsolation::testNameGenerator): (TestWebKitAPI::TEST_P): Canonical link: https://commits.webkit.org/318183@main
https://bugs.webkit.org/show_bug.cgi?id=310698 Reviewed by Yusuke Suzuki. * JSTests/stress/iterator-prototype.js: This test checks whether properties on `Iterator.prototype` are expected. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Canonical link: https://commits.webkit.org/318184@main
https://bugs.webkit.org/show_bug.cgi?id=320390 rdar://183347616 Reviewed by Youenn Fablet. This makes WebTransport receive streams and bidirectional streams work with byob buffers that don't line up exactly with what bytes are received from the network. Tests: imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.html imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.serviceworker.html imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.sharedworker.html imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.worker.html * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.html: Added. * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.js: Added. (async echo_bidirectional_stream): (ascending_bytes): (promise_test.async t): * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.serviceworker-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.serviceworker.html: Added. * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.sharedworker-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.sharedworker.html: Added. * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.worker-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/webtransport/receive-stream-pull.https.any.worker.html: Added. * Source/WebCore/Modules/webtransport/DatagramByteSource.cpp: (WebCore::DatagramByteSource::receiveDatagram): (WebCore::DatagramByteSource::closeStreamIfPossible): * Source/WebCore/Modules/webtransport/WebTransport.cpp: (WebCore::WebTransport::WebTransport): (WebCore::WebTransport::receiveIncomingUnidirectionalStream): (WebCore::createBidirectionalStream): (WebCore::WebTransport::receiveBidirectionalStream): (WebCore::WebTransport::streamReceiveBytes): (WebCore::WebTransport::cleanup): (WebCore::WebTransport::didDrain): * Source/WebCore/Modules/webtransport/WebTransportBidirectionalStreamSource.h: (WebCore::WebTransportBidirectionalStreamSource::stopReceivingIncomingStreams): * Source/WebCore/Modules/webtransport/WebTransportReceiveStream.cpp: (WebCore::WebTransportReceiveStream::create): * Source/WebCore/Modules/webtransport/WebTransportReceiveStreamByteSource.cpp: (WebCore::WebTransportReceiveStreamByteSource::pull): (WebCore::WebTransportReceiveStreamByteSource::deliverBytes): (WebCore::WebTransportReceiveStreamByteSource::closeStream): (WebCore::WebTransportReceiveStreamByteSource::errorStream): (WebCore::WebTransportReceiveStreamByteSource::receiveBytes): (WebCore::WebTransportReceiveStreamByteSource::receiveError): (WebCore::WebTransportReceiveStreamByteSource::cancel): * Source/WebCore/Modules/webtransport/WebTransportReceiveStreamByteSource.h: * Source/WebCore/Modules/webtransport/WebTransportReceiveStreamSource.h: (WebCore::WebTransportReceiveStreamSource::stopReceivingIncomingStreams): Canonical link: https://commits.webkit.org/318185@main
…have a click handler (matching HTML anchors) rdar://181924326 https://bugs.webkit.org/show_bug.cgi?id=319107 Reviewed by Tyler Wilcock. Introduces or guard clause within SVGAElement. This if statement only assigns an AccessibilityRole::Link if the element has an href link or has a click handler. Bare anchor svgs will no longer emit an AcessibilityRole::Link. Also, changes were made to update SVG objects on the AXIsolated Tree as well. Test: accessibility/svg-anchor-with-click-handler-is-link.html * LayoutTests/accessibility/svg-anchor-with-click-handler-is-link-expected.txt: Added. * LayoutTests/accessibility/svg-anchor-with-click-handler-is-link.html: Added. * Source/WebCore/accessibility/AccessibilitySVGObject.cpp: (WebCore::AccessibilitySVGObject::determineAccessibilityRole): * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleClickHandlerChanged): (WebCore::AXObjectCache::handleAttributeChange): Canonical link: https://commits.webkit.org/318186@main
…-of-process iframes https://bugs.webkit.org/show_bug.cgi?id=320563 rdar://183529776 Reviewed by BJ Burg. Automation commands that operate on a specific frame route their IPC to the process hosting that frame via `sendWithAsyncReplyToProcessContainingFrame...`, but pass `webPageIDInMainFrameProcess()` as the destination page identifier. That identifier is only valid in the main frame's process. With site isolation, a cross-origin (out-of-process) frame lives in a different `WebProcess`, where the `RemotePage`'s `WebPage` is registered under a freshly generated `PageIdentifier`. The `WebProcess`-side handler resolves the page with `WebProcess::webPage(pageID)`, which returns null for the main frame id, so the command fails with a `WindowNotFound ("no such window")` error. Add `WebPageProxy::webPageIDInProcessForFrame()`, which return the page identifier valid in the process that actually hosts the frame. For the main frame this resolves to the main frame process and returns m_webPageID, so the non-isolated path is unchanged. Use it at every frame-scoped automation call site. * Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::switchToBrowsingContext): (WebKit::WebAutomationSession::evaluateJavaScriptFunction): (WebKit::WebAutomationSession::resolveChildFrameHandle): (WebKit::WebAutomationSession::resolveParentFrameHandle): (WebKit::WebAutomationSession::computeElementLayout): (WebKit::WebAutomationSession::getComputedRole): (WebKit::WebAutomationSession::consumeUserActivation): (WebKit::WebAutomationSession::getComputedLabel): (WebKit::WebAutomationSession::selectOptionElement): (WebKit::WebAutomationSession::setFilesForInputFileUpload): (WebKit::WebAutomationSession::viewportInViewCenterPointOfElement): (WebKit::WebAutomationSession::evaluateBidiScript): (WebKit::WebAutomationSession::takeScreenshot): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::webPageIDInProcessForFrame): * Source/WebKit/UIProcess/WebPageProxy.h: Canonical link: https://commits.webkit.org/318187@main
https://bugs.webkit.org/show_bug.cgi?id=320136 rdar://183071308 Reviewed by Brady Eidson and Elliott Williams. This patch moves the install location for relocatable builds of webpushd to the standard /Library/LaunchAgents directory where it will automatically be loaded by the system. For more info, please see rdar://171543360. * Source/WebKit/Configurations/webpushd.xcconfig: Canonical link: https://commits.webkit.org/318188@main
…) dump target in the UI process https://bugs.webkit.org/show_bug.cgi?id=319764 rdar://182625550 Reviewed by Alex Christensen. Follow-up to the previous fix in b/317789. Instead of the web process self-reporting whether it hosts the local main frame via InjectedBundle::pageHasLocalMainFrame(), the UI process now determines whether the synchronous notifyDone()/forceImmediateCompletion() message came from the process hosting the main frame and tells WebKitTestRunner via a new WKPageInjectedBundleClient callback. When the message is from the main-frame process, the injected bundle completes the dump locally, matching the non-site-isolation behavior. Otherwise the dump is routed to the process that owns the main frame. These messages are now sent as page-level synchronous messages so the UI process has the page context needed to make that determination. * Source/WebKit/UIProcess/API/C/WKPageInjectedBundleClient.h: * Source/WebKit/UIProcess/WebPageInjectedBundleClient.cpp: (WebKit::WebPageInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle): * Source/WebKit/UIProcess/WebPageInjectedBundleClient.h: * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleSynchronousMessage): * Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::pageHasLocalMainFrame const): Deleted. * Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h: * Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::notifyDone): (WTR::TestRunner::forceImmediateCompletion): * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::createOtherPlatformWebView): (WTR::TestController::createWebViewWithOptions): * Tools/WebKitTestRunner/TestController.h: * Tools/WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): (WTR::TestInvocation::resolveNotifyDone): * Tools/WebKitTestRunner/TestInvocation.h: * LayoutTests/http/tests/site-isolation/force-immediate-completion-expected.txt: Added. * LayoutTests/http/tests/site-isolation/force-immediate-completion.html: Added. * LayoutTests/http/tests/site-isolation/resources/frame-force-immediate-completion.html: Added. * LayoutTests/http/tests/site-isolation/resources/pointer-lock.html: * LayoutTests/platform/ios/http/tests/site-isolation/pointer-lock-expected.txt: Canonical link: https://commits.webkit.org/318189@main
https://bugs.webkit.org/show_bug.cgi?id=320293 rdar://183226312 Reviewed by Pascoe. SymlinkHeaders.cmake spawned readlink through execute_process for every entry to check whether an existing symlink already pointed at the right file. The target that runs it, WebKit_StageFrameworkHeaders, is an add_custom_target with no output, so ninja re-runs it on every build, over roughly 760 and 68 entries. Use file(READ_SYMLINK), which needs no subprocess: re-running the script over a directory of 503 already-staged headers drops from 1.72s to 0.02s. * Source/cmake/SymlinkHeaders.cmake: Canonical link: https://commits.webkit.org/318190@main
https://bugs.webkit.org/show_bug.cgi?id=319894 Reviewed by Yusuke Suzuki. Regression coverage for i32 extended constant expressions used as data/elem offsets and global inits (mod 2^32). Production readers already truncate typed i32 results (see 314444 / 317633@main for memory32 data offsets). * JSTests/wasm/stress/const-expr-i32-wrap.js: Added. Canonical link: https://commits.webkit.org/318395@main
…r copies https://bugs.webkit.org/show_bug.cgi?id=166701 Reviewed by Yusuke Suzuki. customSections already allocates a new ArrayBuffer via tryCreate(span) and memcpy. Cover the bug 166701 requirement that mutating a returned buffer does not affect later customSections results or other returned buffers, and that successive calls do not reuse the same objects. * JSTests/wasm/js-api/Module.customSection.js: Canonical link: https://commits.webkit.org/318396@main
https://bugs.webkit.org/show_bug.cgi?id=319826 Reviewed by Keith Miller. Accept the optional ExceptionOptions argument on WebAssembly.Exception. When traceStack is true, capture a stack and store it under a private name; expose it via a prototype getter (IDL attribute). Default remains no stack. Set the constructor length to 2 to match the IDL. Keep Error on CommonIdentifiers::stack. Register stackPrivateName as a private-only special case (like polyProto) so Exception storage does not introduce a second public "stack" Identifier. * Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.cpp: * Source/JavaScriptCore/wasm/js/WebAssemblyExceptionPrototype.cpp: * Source/JavaScriptCore/builtins/BuiltinNames.h: * Source/JavaScriptCore/builtins/BuiltinNames.cpp: * JSTests/wasm/stress/exception-trace-stack.js: Added. * LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/exception/constructor.tentative.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/exception/constructor.tentative.any.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/idlharness.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/idlharness.any.worker-expected.txt: Canonical link: https://commits.webkit.org/318397@main
https://bugs.webkit.org/show_bug.cgi?id=320772 rdar://183774945 Reviewed by Aditya Keerthi. Expose SPI to define the content environment of a page, a more flexible version of the existing `_editable` WKWebView SPI. Also refactor WebPage to have a dedicated SPI file. * Source/WebKit/UIProcess/API/Swift/WebPage+SPI.swift: Added. (WebPage.setMenuBuilder(_:)): (WebPage.smartListsEnabled): (terminateWebContentProcess): (editorStateSnapshots): (contentEnvironment): * Source/WebKit/UIProcess/API/Swift/WebPage.swift: (editorStateSnapshotsContinuations): (setMenuBuilder(_:)): Deleted. (smartListsEnabled): Deleted. (terminateWebContentProcess): Deleted. (editorStateSnapshots): Deleted. * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/318398@main
https://bugs.webkit.org/show_bug.cgi?id=320820 rdar://183831879 Reviewed by Justin Michaud. StringRecursionChecker behavior is not specified in the spec, and rather causing many random weird behavior. For example, array.join should finish even if we are using a recursion if we have some getter which breaks the cycle in the middle. But it does not happen and showing incorrect behavior. Let's just focus on stack overflow instead of adding StringRecursionChecker checks which is incorrect in terms of the spec. This patch removes StringRecursionChecker. Most of functions are fine as it is automatically doing error checks through JS -> C++ calls. But some are not. In those places, we insert stack overflow check and throwing an error when it is happening. Also WPT is having a wrong test which relies on non-specified behavior. This patch fixes it, and upstreaming a change[1]. [1]: web-platform-tests/wpt#61678 Test: JSTests/stress/string-conversion-recursion.js * JSTests/stress/regress-191731.js: * JSTests/stress/string-conversion-recursion.js: Added. (shouldBe): (shouldThrowRangeError): (shouldThrowRangeError.get return): (array.0.toString): (shouldBe.array.join): (new.Error): * JSTests/wasm/v8/regress/regress-769846.js: (catch): * LayoutTests/imported/w3c/IndexedDB-private-browsing/keypath-expected.txt: * LayoutTests/imported/w3c/IndexedDB-private-browsing/keypath.html: * LayoutTests/imported/w3c/web-platform-tests/IndexedDB/keypath.any-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/IndexedDB/keypath.any.js: (indexeddb_test): * LayoutTests/imported/w3c/web-platform-tests/IndexedDB/keypath.any.serviceworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/IndexedDB/keypath.any.sharedworker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/IndexedDB/keypath.any.worker-expected.txt: * LayoutTests/js/array-string-recursion-expected.txt: * LayoutTests/js/array-tostring-and-join-expected.txt: * LayoutTests/js/dom/cyclic-ref-toString-expected.txt: * LayoutTests/js/dom/script-tests/cyclic-ref-toString.js: * LayoutTests/js/kde/crash-1-expected.txt: * LayoutTests/js/script-tests/array-string-recursion.js: (catch): * LayoutTests/js/script-tests/array-tostring-and-join.js: (Object.prototype.toString): (plain.toString): (obj.__proto__.toString): Deleted. * LayoutTests/js/script-tests/toString-recursion.js: * LayoutTests/js/toString-recursion-expected.txt: * Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: * Source/JavaScriptCore/Sources.txt: * Source/JavaScriptCore/runtime/ArrayPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/ArrayPrototypeInlines.h: * Source/JavaScriptCore/runtime/ErrorPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/JSArray.cpp: (JSC::JSArray::fastToString): * Source/JavaScriptCore/runtime/RegExpPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/runtime/StringRecursionChecker.cpp: Removed. * Source/JavaScriptCore/runtime/StringRecursionChecker.h: Removed. * Source/JavaScriptCore/runtime/VM.h: Canonical link: https://commits.webkit.org/318399@main
…DoNotInterceptHitTesting is a flaky failure on macOS Sequoia bots https://bugs.webkit.org/show_bug.cgi?id=320732 rdar://183717723 Reviewed by Pascoe. Failing results suggest that `barCenter` was computed before the HUD bar subview was not fully laid out, which produced a bad hit test. This patch attempts to make the test more robust by waiting for not only >=2 HUDs, but also for non-empty bar frames. * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UnifiedPDFTests.mm: (TestWebKitAPI::UNIFIED_PDF_TEST): Canonical link: https://commits.webkit.org/318400@main
* LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/gtk/TestExpectations: * LayoutTests/platform/wpe/TestExpectations: Canonical link: https://commits.webkit.org/318401@main
…mory bandwidth https://bugs.webkit.org/show_bug.cgi?id=320745 Reviewed by Carlos Garcia Campos and Nikolas Zimmermann. m_contentsOpaque only describes what the layer paints into its own tiles, so a layer whose contents come from an opaque buffer like a WebGL canvas created with alpha:false, an opaque video frame or an opaque image, are composited with source-over and read the destination for every pixel adding read bandwidth usage. TextureMapper gets the same decision off the buffer flags. Consider those flags too, restricted to layers with no backing store of their own, since the flag says nothing about the opacity of the layer's own tiles. * Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp: (WebCore::SkiaCompositingLayer::paintContents): Canonical link: https://commits.webkit.org/318402@main
https://bugs.webkit.org/show_bug.cgi?id=320700 Reviewed by Mike Wyrzykowski. * Source/JavaScriptCore/inspector/protocol/Canvas.json: * Source/WebCore/inspector/agents/InspectorCanvasAgent.h: (WebCore::InspectorCanvasAgent::setShaderProgramDisabled): (WebCore::InspectorCanvasAgent::isWebGPURenderPipelineDisabled): Added. * Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::setShaderProgramDisabled): (WebCore::InspectorCanvasAgent::isWebGPURenderPipelineDisabled): Added. * Source/WebCore/inspector/InspectorShaderProgram.h: * Source/WebCore/inspector/InspectorShaderProgram.cpp: (WebCore::InspectorShaderProgram::setDisabled): * Source/WebCore/inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::isWebGPURenderPipelineDisabled): Added. (WebCore::InspectorInstrumentation::isWebGPURenderPipelineDisabledImpl): Added. * Source/WebCore/inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::isWebGPURenderPipelineDisabledImpl): Added. Expose disabling for `GPURenderPipeline` and throw when attempting the same for `GPUComputePipeline`. * Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.h: (WebCore::GPURenderPassEncoder): * Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.cpp: (WebCore::GPURenderPassEncoder::setPipeline): (WebCore::GPURenderPassEncoder::draw): (WebCore::GPURenderPassEncoder::drawIndexed): (WebCore::GPURenderPassEncoder::drawIndirect): (WebCore::GPURenderPassEncoder::drawIndexedIndirect): (WebCore::GPURenderPassEncoder::executeBundles): (WebCore::GPURenderPassEncoder::end): * Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.h: (WebCore::GPURenderBundleEncoder): * Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.cpp: (WebCore::GPURenderBundleEncoder::setPipeline): (WebCore::GPURenderBundleEncoder::draw): (WebCore::GPURenderBundleEncoder::drawIndexed): (WebCore::GPURenderBundleEncoder::drawIndirect): (WebCore::GPURenderBundleEncoder::drawIndexedIndirect): (WebCore::GPURenderBundleEncoder::finish): Track the current `GPURenderPipeline` and bail if inspector says it's disabled. * Source/WebInspectorUI/UserInterface/Models/ShaderProgram.js: (WI.ShaderProgram.prototype.get supportsDisabling): Added. (WI.ShaderProgram.prototype.set disabled): * Source/WebInspectorUI/UserInterface/Views/ShaderProgramTreeElement.js: (WI.ShaderProgramTreeElement.prototype.constructor): (WI.ShaderProgramTreeElement.prototype.onattach): (WI.ShaderProgramTreeElement.prototype.ondetach): (WI.ShaderProgramTreeElement.prototype.populateContextMenu): Also allow disabling for ` WI.Canvas.ContextType.WebGPU` (but not `WI.ShaderProgram.ProgramType.Compute`). * LayoutTests/inspector/canvas/resources/shaderProgram-utilities-webgpu.js: * LayoutTests/inspector/canvas/setShaderProgramDisabled-webgpu.html: Added. * LayoutTests/inspector/canvas/setShaderProgramDisabled-webgpu-expected.txt: Added. * LayoutTests/inspector/canvas/shaderProgram-add-remove-webgpu.html: * LayoutTests/inspector/canvas/shaderProgram-add-remove-webgpu-expected.txt: * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/win/TestExpectations: Canonical link: https://commits.webkit.org/318403@main
https://bugs.webkit.org/show_bug.cgi?id=320784 Reviewed by Adrian Perez de Castro and Carlos Garcia Campos. This was using the wrong flags to match types. Update docs and add tests for more types. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebsiteData.cpp * Source/WebKit/UIProcess/API/glib/WebKitWebsiteData.cpp: (webkit_website_data_get_size): * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebsiteData.cpp: (testWebsiteDataStorage): (testWebsiteDataDatabases): (testWebsiteDataDOMCache): (testWebsiteDataSizes): (beforeAll): Canonical link: https://commits.webkit.org/318404@main
https://bugs.webkit.org/show_bug.cgi?id=320809 Reviewed by Carlos Garcia Campos. This has been enabled on Apple ports for a while. After the fixes in https://commits.webkit.org/318384@main it just works. * LayoutTests/platform/glib/TestExpectations: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: Canonical link: https://commits.webkit.org/318405@main
https://bugs.webkit.org/show_bug.cgi?id=320724 rdar://182292429 Reviewed by Etienne Segonzac. Let a spatial portal host more than one <model> child. SpatialPortalController tracks its children in a map keyed by NodeIdentifier, loading each one and routing callbacks back to the right child. The Model process keeps one entity per node, and a new UnloadModel message removes one without tearing down the player the other models share. The container transform fits the union of every hosted model's bounding box. The first model to load still owns stage mode, animation reporting and the environment map, so the single-model case is unchanged. Tests: spatial-css/spatial-portal-multi-model-error.html spatial-css/spatial-portal-multi-model-insert-remove.html spatial-css/spatial-portal-multi-model-move.html spatial-css/spatial-portal-multi-model-source-change.html spatial-css/spatial-portal-multi-model.html * LayoutTests/spatial-css/resources/spatial-portal-utils.js: Added. (const.appendModel): * LayoutTests/spatial-css/spatial-portal-multi-model-error-expected.txt: Added. * LayoutTests/spatial-css/spatial-portal-multi-model-error.html: Added. * LayoutTests/spatial-css/spatial-portal-multi-model-expected.txt: Added. * LayoutTests/spatial-css/spatial-portal-multi-model-insert-remove-expected.txt: Added. * LayoutTests/spatial-css/spatial-portal-multi-model-insert-remove.html: Added. * LayoutTests/spatial-css/spatial-portal-multi-model-move-expected.txt: Added. * LayoutTests/spatial-css/spatial-portal-multi-model-move.html: Added. * LayoutTests/spatial-css/spatial-portal-multi-model-source-change-expected.txt: Added. * LayoutTests/spatial-css/spatial-portal-multi-model-source-change.html: Added. * LayoutTests/spatial-css/spatial-portal-multi-model.html: Added. * Source/WebCore/Modules/model-element/HTMLModelElement.cpp: (WebCore::HTMLModelElement::setSourceURL): * Source/WebCore/Modules/model-element/SpatialPortalController.cpp: (WebCore::SpatialPortalController::~SpatialPortalController): (WebCore::SpatialPortalController::hostedModelElement const): (WebCore::SpatialPortalController::unregisterChildModel): (WebCore::SpatialPortalController::registerChildModel): (WebCore::SpatialPortalController::childModelDidChange): (WebCore::SpatialPortalController::loadChildModelsIfReady): (WebCore::SpatialPortalController::loadChildModelIfReady): (WebCore::SpatialPortalController::viewportIntersectionChanged): (WebCore::SpatialPortalController::deleteModelPlayer): (WebCore::SpatialPortalController::unloadChildModel): (WebCore::SpatialPortalController::configureGraphicsLayer): (WebCore::SpatialPortalController::modelDidFinishLoading): (WebCore::SpatialPortalController::modelDidFailLoading): (WebCore::SpatialPortalController::modelDidUnload): (WebCore::SpatialPortalController::unloadModel): Deleted. * Source/WebCore/Modules/model-element/SpatialPortalController.h: (WebCore::SpatialPortalController::numberOfHostedModels const): * Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h: * Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.messages.in: * Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm: (WebKit::ModelProcessModelPlayerProxy::~ModelProcessModelPlayerProxy): (WebKit::ModelProcessModelPlayerProxy::loadModel): (WebKit::ModelProcessModelPlayerProxy::reloadModel): (WebKit::ModelProcessModelPlayerProxy::unloadModelTimerFired): (WebKit::ModelProcessModelPlayerProxy::computeTransform): (WebKit::ModelProcessModelPlayerProxy::updateTransform): (WebKit::ModelProcessModelPlayerProxy::updateOpacity): (WebKit::ModelProcessModelPlayerProxy::didFinishLoading): (WebKit::ModelProcessModelPlayerProxy::didFailLoading): (WebKit::ModelProcessModelPlayerProxy::load): (WebKit::ModelProcessModelPlayerProxy::unloadModel): (WebKit::ModelProcessModelPlayerProxy::clearReportingModelIfNeeded): (WebKit::ModelProcessModelPlayerProxy::reportingModelScale const): (WebKit::ModelProcessModelPlayerProxy::findHostedEntityForLoader): (WebKit::ModelProcessModelPlayerProxy::cancelAllLoaders): (WebKit::ModelProcessModelPlayerProxy::setUpLoadedEntity): (WebKit::ModelProcessModelPlayerProxy::sizeDidChange): (WebKit::ModelProcessModelPlayerProxy::updateForCurrentStageMode): (WebKit::ModelProcessModelPlayerProxy::updateTransformSRT): (WebKit::ModelProcessModelPlayerProxy::teardownEntity): (WebKit::ModelProcessModelPlayerProxy::ensureImmersivePresentation): (WebKit::ModelProcessModelPlayerProxy::exitImmersivePresentation): (WebKit::ModelProcessModelPlayerProxy::startAnimating): Deleted. * Source/WebKit/WebKitSwift/RealityKit/WKRKEntity.h: * Source/WebKit/WebKitSwift/RealityKit/WKRKEntity.swift: (WKRKEntity.removeFromParentEntity): * Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.cpp: (WebKit::ModelProcessModelPlayer::unload): * Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.h: * Tools/TestWebKitAPI/Resources/spatial-portal-two-models-page.html: Canonical link: https://commits.webkit.org/318406@main
https://bugs.webkit.org/show_bug.cgi?id=201651 Reviewed by Mike Wyrzykowski. * Source/WebCore/Modules/WebGPU/GPUDevice.idl: * Source/WebCore/Modules/WebGPU/GPUDevice.h: (WebCore::GPUDevice::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUDevice::setHasActiveInspectorCanvasCallTracer): Added. * Source/WebCore/Modules/WebGPU/GPUDevice.cpp: (WebCore::GPUDevice::GPUDevice): (WebCore::GPUDevice::createSampler): (WebCore::GPUDevice::importExternalTexture): (WebCore::GPUDevice::createBindGroupLayout): (WebCore::GPUDevice::createAutoPipelineLayout): (WebCore::GPUDevice::createPipelineLayout): (WebCore::GPUDevice::createBindGroup): (WebCore::GPUDevice::createShaderModule): (WebCore::GPUDevice::createCommandEncoder): (WebCore::GPUDevice::createRenderBundleEncoder): (WebCore::GPUDevice::createQuerySet): * Source/WebCore/Modules/WebGPU/GPUQueue.idl: * Source/WebCore/Modules/WebGPU/GPUQueue.h: (WebCore::GPUQueue::create): * Source/WebCore/Modules/WebGPU/GPUQueue.cpp: (WebCore::GPUQueue::GPUQueue): (WebCore::GPUQueue::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUQueue::device const): Added. (WebCore::GPUQueue::submit): * Source/WebCore/Modules/WebGPU/GPUBuffer.idl: * Source/WebCore/Modules/WebGPU/GPUBuffer.h: * Source/WebCore/Modules/WebGPU/GPUBuffer.cpp: (WebCore::GPUBuffer::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUBuffer::device const): Added. * Source/WebCore/Modules/WebGPU/GPUTexture.idl: * Source/WebCore/Modules/WebGPU/GPUTexture.h: (WebCore::GPUTexture::create): * Source/WebCore/Modules/WebGPU/GPUTexture.cpp: (WebCore::GPUTexture::GPUTexture): (WebCore::GPUTexture::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUTexture::device const): Added. (WebCore::GPUTexture::createView): * Source/WebCore/Modules/WebGPU/GPUTextureView.idl: * Source/WebCore/Modules/WebGPU/GPUTextureView.h: (WebCore::GPUTextureView::create): * Source/WebCore/Modules/WebGPU/GPUTextureView.cpp: (WebCore::GPUTextureView::GPUTextureView): Added. (WebCore::GPUTextureView::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUTextureView::device const): Added. * Source/WebCore/Modules/WebGPU/GPUExternalTexture.idl: * Source/WebCore/Modules/WebGPU/GPUExternalTexture.h: (WebCore::GPUExternalTexture::create): * Source/WebCore/Modules/WebGPU/GPUExternalTexture.cpp: (WebCore::GPUExternalTexture::GPUExternalTexture): Added. (WebCore::GPUExternalTexture::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUExternalTexture::device const): Added. * Source/WebCore/Modules/WebGPU/GPUSampler.idl: * Source/WebCore/Modules/WebGPU/GPUSampler.h: (WebCore::GPUSampler::create): * Source/WebCore/Modules/WebGPU/GPUSampler.cpp: (WebCore::GPUSampler::GPUSampler): Added. (WebCore::GPUSampler::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUSampler::device const): Added. * Source/WebCore/Modules/WebGPU/GPUBindGroupLayout.idl: * Source/WebCore/Modules/WebGPU/GPUBindGroupLayout.h: (WebCore::GPUBindGroupLayout::create): * Source/WebCore/Modules/WebGPU/GPUBindGroupLayout.cpp: (WebCore::GPUBindGroupLayout::GPUBindGroupLayout): Added. (WebCore::GPUBindGroupLayout::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUBindGroupLayout::device const): Added. * Source/WebCore/Modules/WebGPU/GPUBindGroup.idl: * Source/WebCore/Modules/WebGPU/GPUBindGroup.h: (WebCore::GPUBindGroup::create): * Source/WebCore/Modules/WebGPU/GPUBindGroup.cpp: (WebCore::GPUBindGroup::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUBindGroup::device const): Added. (WebCore::GPUBindGroup::GPUBindGroup): * Source/WebCore/Modules/WebGPU/GPUPipelineLayout.idl: * Source/WebCore/Modules/WebGPU/GPUPipelineLayout.h: (WebCore::GPUPipelineLayout::create): * Source/WebCore/Modules/WebGPU/GPUPipelineLayout.cpp: (WebCore::GPUPipelineLayout::GPUPipelineLayout): Added. (WebCore::GPUPipelineLayout::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUPipelineLayout::device const): Added. * Source/WebCore/Modules/WebGPU/GPUShaderModule.idl: * Source/WebCore/Modules/WebGPU/GPUShaderModule.h: (WebCore::GPUShaderModule::create): * Source/WebCore/Modules/WebGPU/GPUShaderModule.cpp: (WebCore::GPUShaderModule::GPUShaderModule): Added. (WebCore::GPUShaderModule::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUShaderModule::device const): Added. * Source/WebCore/Modules/WebGPU/GPUComputePipeline.idl: * Source/WebCore/Modules/WebGPU/GPUComputePipeline.h: * Source/WebCore/Modules/WebGPU/GPUComputePipeline.cpp: (WebCore::GPUComputePipeline::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUComputePipeline::getBindGroupLayout): * Source/WebCore/Modules/WebGPU/GPURenderPipeline.idl: * Source/WebCore/Modules/WebGPU/GPURenderPipeline.h: * Source/WebCore/Modules/WebGPU/GPURenderPipeline.cpp: (WebCore::GPURenderPipeline::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPURenderPipeline::getBindGroupLayout): * Source/WebCore/Modules/WebGPU/GPUCommandEncoder.idl: * Source/WebCore/Modules/WebGPU/GPUCommandEncoder.h: (WebCore::GPUCommandEncoder::create): * Source/WebCore/Modules/WebGPU/GPUCommandEncoder.cpp: (WebCore::GPUCommandEncoder::GPUCommandEncoder): (WebCore::GPUCommandEncoder::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUCommandEncoder::device const): Added. (WebCore::GPUCommandEncoder::beginRenderPass): (WebCore::GPUCommandEncoder::beginComputePass): (WebCore::GPUCommandEncoder::finish): * Source/WebCore/Modules/WebGPU/GPUComputePassEncoder.idl: * Source/WebCore/Modules/WebGPU/GPUComputePassEncoder.h: (WebCore::GPUComputePassEncoder::create): * Source/WebCore/Modules/WebGPU/GPUComputePassEncoder.cpp: (WebCore::GPUComputePassEncoder::GPUComputePassEncoder): (WebCore::GPUComputePassEncoder::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUComputePassEncoder::device const): Added. (WebCore::GPUComputePassEncoder::end): * Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.idl: * Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.h: (WebCore::GPURenderPassEncoder::create): * Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.cpp: (WebCore::GPURenderPassEncoder::GPURenderPassEncoder): (WebCore::GPURenderPassEncoder::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPURenderPassEncoder::device const): Added. (WebCore::GPURenderPassEncoder::end): * Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.idl: * Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.h: (WebCore::GPURenderBundleEncoder::create): * Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.cpp: (WebCore::GPURenderBundleEncoder::GPURenderBundleEncoder): Added. (WebCore::GPURenderBundleEncoder::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPURenderBundleEncoder::device const): Added. (WebCore::GPURenderBundleEncoder::finish): * Source/WebCore/Modules/WebGPU/GPURenderBundle.idl: * Source/WebCore/Modules/WebGPU/GPURenderBundle.h: (WebCore::GPURenderBundle::create): * Source/WebCore/Modules/WebGPU/GPURenderBundle.cpp: (WebCore::GPURenderBundle::GPURenderBundle): Added. (WebCore::GPURenderBundle::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPURenderBundle::device const): Added. * Source/WebCore/Modules/WebGPU/GPUCommandBuffer.idl: * Source/WebCore/Modules/WebGPU/GPUCommandBuffer.h: * Source/WebCore/Modules/WebGPU/GPUCommandBuffer.cpp: (WebCore::GPUCommandBuffer::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUCommandBuffer::device const): Added. * Source/WebCore/Modules/WebGPU/GPUQuerySet.idl: * Source/WebCore/Modules/WebGPU/GPUQuerySet.h: (WebCore::GPUQuerySet::create): * Source/WebCore/Modules/WebGPU/GPUQuerySet.cpp: (WebCore::GPUQuerySet::GPUQuerySet): (WebCore::GPUQuerySet::hasActiveInspectorCanvasCallTracer const): Added. (WebCore::GPUQuerySet::device const): Added. * Source/WebCore/Modules/WebGPU/GPUPresentationContext.h: * Source/WebCore/inspector/RecordingSwizzleType.h: * Source/WebCore/inspector/InspectorCanvasCallTracer.h: (WebCore::InspectorCanvasCallTracer::processArgument): (WebCore::InspectorCanvasCallTracer::recordAction): (WebCore::InspectorCanvasCallTracer::receiverSwizzleType): Added. (WebCore::InspectorCanvasCallTracer::receiverSwizzleTypeImpl): Added. * Source/WebCore/inspector/InspectorCanvasCallTracer.cpp: (WebCore::enabledCanvasAgent): (WebCore::InspectorCanvasCallTracer::enabledInspectorCanvas): (WebCore::InspectorCanvasCallTracer::recordAction): Add `CallTrace` to every WebGPU IDL (including those without any methods today so future API additions automatically get support). Each object now has a link to the owner `GPUDevice` so the `CallTracer` can check whether recording is active. * Source/JavaScriptCore/inspector/protocol/Recording.json: * Source/JavaScriptCore/inspector/scripts/codegen/generator.py: * Source/WebCore/inspector/InspectorCanvas.h: * Source/WebCore/inspector/InspectorCanvas.cpp: (WebCore::InspectorCanvas::hasActiveInspectorCanvasCallTracer): Added. (WebCore::InspectorCanvas::setHasActiveInspectorCanvasCallTracer): Added. (WebCore::InspectorCanvas::resetRecordingData): (WebCore::shouldSnapshotWebGPUAction): Added. (WebCore::InspectorCanvas::recordAction): (WebCore::buildActionReceiver): Added. (WebCore::InspectorCanvas::releaseObjectForRecording): (WebCore::InspectorCanvas::getContentAsDataURL): Added WebGPU support for device-backed canvases. (WebCore::InspectorCanvas::appendActionSnapshotIfNeeded): (WebCore::InspectorCanvas::identifierForRecordingObject): Added. (WebCore::InspectorCanvas::buildInitialState): Store explicit receivers as `[identifier, swizzleType]` before the optional snapshot field. * Source/WebCore/inspector/agents/InspectorCanvasAgent.h: * Source/WebCore/inspector/agents/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::startRecording): (WebCore::InspectorCanvasAgent::stopRecording): (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame): (WebCore::InspectorCanvasAgent::didCreateWebGPUDevice): (WebCore::InspectorCanvasAgent::recordAction): (WebCore::InspectorCanvasAgent::scheduleRecordingCanvasFrame): Added. (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas): (WebCore::InspectorCanvasAgent::consoleStopRecordingCanvas): (WebCore::InspectorCanvasAgent::reset): (WebCore::InspectorCanvasAgent::unbindCanvas): Support explicit and automatic `GPUDevice` recordings. * Source/WebCore/page/FrameConsoleClient.cpp: (WebCore::FrameConsoleClient::record): (WebCore::FrameConsoleClient::recordEnd): * Source/WebCore/workers/WorkerConsoleClient.cpp: (WebCore::WorkerConsoleClient::record): (WebCore::WorkerConsoleClient::recordEnd): * Source/WebCore/inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::consoleStartRecordingCanvas): (WebCore::InspectorInstrumentation::consoleStopRecordingCanvas): * Source/WebCore/inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::consoleStartRecordingCanvasImpl): (WebCore::InspectorInstrumentation::consoleStopRecordingCanvasImpl): Support `console.record()` and `console.recordEnd()` for `GPUDevice`. * Source/WebInspectorUI/UserInterface/Models/Canvas.js: (WI.Canvas.prototype.get supportsRecording): Deleted. (WI.Canvas.prototype.recordingProgress): * Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js: (WI.CanvasContentView.prototype.initialLayout): * Source/WebInspectorUI/UserInterface/Views/CanvasSidebarPanel.js: (WI.CanvasSidebarPanel.prototype._canvasChanged): (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem): Pass the backend recording version when parsing a live recording. * Source/WebInspectorUI/UserInterface/Models/Recording.js: (WI.Recording.fromPayload): (WI.Recording.displayNameForRecordingType): (WI.Recording.displayNameForReceiver): Added. (WI.Recording.prototype.get isCanvas): (WI.Recording.prototype.get isCanvasWebGPU): Added. (WI.Recording.prototype.createContext): (WI.Recording.prototype.toJSON): (WI.Recording.prototype.toHTML): (WI.Recording.prototype._process): * Source/WebInspectorUI/UserInterface/Models/RecordingAction.js: (WI.RecordingAction): (WI.RecordingAction.fromPayload): (WI.RecordingAction.isFunctionForType): (WI.RecordingAction.bitfieldNamesForParameter): (WI.RecordingAction.constantNameForParameter): (WI.RecordingAction._prototypeForType): (WI.RecordingAction.prototype.get receiver): Added. (WI.RecordingAction.prototype.get contextReplacer): Deleted. (WI.RecordingAction.prototype.process): (WI.RecordingAction.prototype.swizzle): (WI.RecordingAction.prototype.get isCanvasReceiver): Added. (WI.RecordingAction.prototype.apply): (WI.RecordingAction.prototype.toJSON): * Source/WebInspectorUI/UserInterface/Models/RecordingFrame.js: (WI.RecordingFrame.fromPayload): (WI.RecordingFrame.prototype.toJSON): Parse snapshot-based WebGPU recordings without attempting to replay WebGPU commands. Display receiver identifier and type pairs as lower-camel-cased names. Drive-by: Include offscreen WebGL(2) recordings when resolving constants, bitfields, and snapshot-based processing. * Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js: (WI.RecordingActionTreeElement._generateDOM): (WI.RecordingActionTreeElement._classNameForAction): (WI.RecordingActionTreeElement.prototype.populateContextMenu): * Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.css: (body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.recording-action.selected:not(.invalid, .initial-state, .name-unknown) > .icon): Renamed from `body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.recording-action.selected:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon`. (.item.recording-action:not(.invalid, .initial-state, .name-unknown) > .icon): Renamed from `.item.recording-action:not(.invalid, .initial-state, .has-context-replacer, .name-unknown) > .icon`. Display only explicit receivers and copy actions against the correct `GPUDevice`, `CanvasRenderingContext`, or `<canvas>`. * Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js: (WI.RecordingContentView): (WI.RecordingContentView.prototype._generateContentFromSnapshot): (WI.RecordingContentView.prototype._updateImageGrid): Show WebGPU content from snapshots and clear stale preview content when a recording has no initial snapshot. * Source/WebInspectorUI/UserInterface/Views/TreeOutline.js: (WI.TreeOutline.prototype.registerScrollVirtualizer): Drive-by: disable native scroll anchoring when virtualized so recycled recording rows do not cause scrolling to continue on its own. * Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js: * LayoutTests/inspector/canvas/recording.html: * LayoutTests/inspector/canvas/recording-expected.txt: * LayoutTests/inspector/canvas/recording-webgpu.html: Added. * LayoutTests/inspector/canvas/recording-webgpu-expected.txt: Added. * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/win/TestExpectations: Canonical link: https://commits.webkit.org/318407@main
…eb3c) - Drop USE(JSVALUE64) guards from ffi/ and JSDollarVM.cpp: the macro is no longer defined so these blocks were compiled out entirely. - FFIDFG.cpp: remove dead is64Bit() check. - FFIICStub.cpp: payloadFor -> lowWordFor. - InspectorDebuggerAgent.cpp: handle BunTranspiledModule/Synthetic in the new scriptTypeForScript switch. - CMakeLists.txt: drop StringRecursionChecker.h from the private headers list (removed upstream in f2f2c2d).
Preview Builds
|
There was a problem hiding this comment.
No issues found by automated review, but this is a large upstream merge (300 files, 110 JSC/WTF/bmalloc commits) with 17 hand-resolved conflicts and fork-specific fixups for the 32-bit JSValue removal — worth a human pass over the conflict resolutions and ffi/* / InspectorDebuggerAgent adaptations.
Checked: the PRUNE_STALE header-staging block in Source/JavaScriptCore/CMakeLists.txt — still present after the merge, not dropped.
Checked: StringRecursionChecker.h removal from the private headers list matches upstream f2f2c2ddf637.
Bulk of the diff is upstream JSTests / wasm spec-test regeneration and deletions, which carry no fork-specific risk.
Extended reasoning...
Overview
This PR merges upstream WebKit 3722912ff800 into the Bun fork, spanning ~300 files and ~1M characters of diff. The vast majority is upstream-authored: new/regenerated JSTests (stress, microbenchmarks, wasm spec tests), deletion of superseded wasm spec-test harnesses, and JSC/WTF/bmalloc engine changes from 110 upstream commits. The fork-authored portion is comparatively small but high-leverage: 17 manual conflict resolutions preserving USE(BUN_JSC_ADDITIONS) hunks, and follow-up fixups adapting fork-only code (ffi/*, tools/JSDollarVM.cpp, inspector/agents/InspectorDebuggerAgent.cpp, CMakeLists.txt) to upstream's removal of USE_JSVALUE64/USE_JSVALUE32_64, is64Bit(), and payloadFor.
Security risks
None introduced by the merge mechanics themselves. The upstream content includes changes to Yarr, JIT tiers, BigInt arithmetic, and the module loader — all security-relevant surfaces — but those changes are upstream-reviewed WebKit commits, not authored here. The fork-specific fixups are mechanical (guard removal, payloadFor → lowWordFor, adding switch cases) and do not introduce new attack surface.
Level of scrutiny
High. Even though the bulk is upstream code, the 17 hand-resolved conflicts in JSC/WTF and the 32-bit-removal adaptations in fork-only FFI code are exactly where a merge can silently drop a Bun-specific guard or mis-adapt an ABI-sensitive helper. The PR description is thorough and the author verified a debug build + bun run build:local, but conflict-resolution correctness in a JIT/runtime is not something automated review can fully validate.
Other factors
- The bug-hunting system raised and then ruled out one candidate: that the fork's
PRUNE_STALEheader-staging feature inCMakeLists.txtwas dropped by the merge. Verified it is still present. - No prior reviews or comments on the PR.
- A companion Bun-side PR is required for
AbstractModuleRecord/ScriptFetchParameters::Typechanges; this PR is not standalone-landable without it. - Given the scope, complexity, and criticality (JS engine core), deferring to human review rather than approving.
Upgrades the WebKit fork to upstream WebKit/WebKit@3722912ff800 (2026-08-02) via oven-sh/WebKit#383. oven-sh/WebKit#383 is merged; `WEBKIT_VERSION` points at the merge commit `e6e37cda216c0292ae68c30c84a9dc8601d0fba5`. ## Bun-side changes Upstream `90b2ecf79ae3` keys `m_loadedModules` on `(specifier, ScriptFetchParameters::Type)` and threads the type through `ImportEntry`, `ExportEntry`, `StarExportEntry`, and `ModuleAnalyzer::appendRequestedModule`. Under `bun test --isolate` (the `BunTranspiledModule` path), Bun'''s synthesized record must agree with what JSC'''s own `ModuleAnalyzer` would produce from the printed source; a mismatch fails the BUN_DEBUG record diff in debug and null-derefs `hostResolveImportedModule` in release. - `analyze_transpiled_module` / `js_printer`: every `RecordKind` now carries one trailing `FetchParameters` slot. `add_import_info_*` and `add_export_info_*` accept it; `finalize()` propagates the source import'''s slot through the Local->Indirect conversion. `RequestedModules` dedupes on `(specifier, Type, phase)`. - `analyze_jsc.rs`: decodes the trailing slot to the JSC `Type` enum and passes it to every `addImportEntry*` / `addIndirectExport` / `addNamespaceExport` / `addStarExport`; buffer validation is per-slot so only the trailing slot accepts the wider `FetchParameters` sentinel range. - `BunAnalyzeTranspiledModule.cpp`: all seven `addImportEntry*` / `add*Export` functions take `uint8_t moduleRequestType` and set `.moduleRequestType` explicitly; `dumpRecordInfo()` prints `type(N)` for import/export/star entries; `static_assert` pins the ordinal values `to_script_fetch_parameters_type()` hardcodes. - `RuntimeTranspilerCache` `EXPECTED_VERSION` -> 25 (esm_record layout change). ## WebKit-side changes (oven-sh/WebKit#383) - 17 merge conflicts resolved in JSC/WTF; fork's `USE(BUN_JSC_ADDITIONS)` hunks preserved. - Fork `ffi/` code adapted to upstream's 32-bit removal (`USE_JSVALUE64` macro deleted, `is64Bit()` removed, `payloadFor` -> `lowWordFor`). - `InspectorDebuggerAgent.cpp`: handle `BunTranspiledModule`/`Synthetic` in new `scriptTypeForScript` switch. - Recorded `01aaa3e0be0c` as ancestor via `-s ours` (oven-sh/WebKit#352 was a squash merge). ## How did you verify your code works? - `bun run jsc:build:debug` builds and the `jsc` shell runs (`-e 'print(42)'` -> `42`). - `bun run build:local -p '42'` links and runs against the local merged WebKit. - oven-sh/WebKit#383 preview build green on all 38 platform variants. - `bun bd -p 'process.versions.webkit'` -> `preview-pr-383-b9ea4dc5`. - New test `test/js/bun/jsc/webkit-upgrade-3722912f.test.ts`: 4/4 pass with `bun bd test`, 3/4 fail with `USE_SYSTEM_BUN=1 bun test` (old JSC lacks `Iterator.prototype.includes`, returns `""` for cyclic join, `WebAssembly.Exception.length === 1`). ## JavaScriptCore/WTF/bmalloc changes since 01aaa3e0be0c (Jul 25) Upstream range: WebKit/WebKit@01aaa3e0be0c...3722912ff800 (474 commits total, 110 touching JSC/WTF/bmalloc, Jul 25 → Aug 2 2026). ### Highlights - `29ceb3c03de3` Remove 32-bit JSValues (JSVALUE32_64 and `CPU(NEEDS_ALIGNED_ACCESS)` deleted). - `857bd4334690` Remove ARMv7 JIT support (ARMv7 is CLoop-only now; drops remaining 32-bit/x86 JIT refs). - `232cebabc1f3` Remove big-endian support and platforms without unaligned loads/stores (WTF + JSC). - `6eaa5ac1f65d` Remove 32-bit libpas support. - `bfb1b1183bc2` Remove the B3/Air graph-coloring register allocator (greedy is the only allocator now). - `0d0080ea539d` Enable WebAssembly Memory64 by default (+ Table64/SIMD follow-ups). - `f2f2c2ddf637` Remove `StringRecursionChecker`; cyclic `toString`/`join` now throws RangeError via stack check (spec-correct). - `319f94b3db4a` Enable `Iterator.prototype.includes()` by default. - `90b2ecf79ae3` `hostResolveImportedModule` now honors import-attribute `type` (module loader behavior change). - `f5716f6401ed` Add `preserve_most` calling convention to fastMalloc APIs on ARM64 (perf + ABI of WTF alloc entry points). ### JavaScriptCore **Runtime / builtins** - `f2f2c2ddf637` Remove StringRecursionChecker; rely on stack-overflow checks. - `cd91e7f128dd` Add fast flag for `ToPrimitive(Object)` calls in runtime. - `173a0bd6d937` Use `defaultToPrimitiveFastAndNonObservable` in `JSObject::toString`. - `960adeccefcd` Fast operation for `Array#shift`. - `92c6650c7947` Add `JSArrayIterator::next` C++ helper. - `cb1c48b3e95f` Extend `Array.from()` Set fast path to `set.keys()/.values()`. - `4a2e724d6789` Fix: `Array.from(set.keys()/.values())` fast path ignored `Symbol.iterator` overrides. - `73e4c589c1e6` Extend `StringSplitCache` to RegExp separators. - `656d3c36830f` / `1d355c27ea88` 8-byte SWAR fast paths in `JSON.stringify` string copy (same-type & upconvert). - `9f9370cc729f` Fix JSON.stringify regression around `toJSON` check. - `2eb77e9c9473` BigInt: implement Crandall reduction. - `39b1bb9cfc85` BigInt: deploy Comba multiplication more broadly. - `319f94b3db4a` Enable `Iterator.prototype.includes()`. - `0731b27c1b60` `Iterator.zip`: use null-prototype objects for options/underlying iterator. - `90b2ecf79ae3` `hostResolveImportedModule` respects module request import-attribute `type`. - `4f54300b848a` Collect diagnostics when `getDirect` returns zero JSValue in `llint_slow_path_get_by_id`. **Parser / bytecompiler** - `c2beca7a439f` Lexer: scan integer tokens in a single pass. - `72ea806faa21` Use overflow-safe range when choosing a switch jump table. **LLInt / DFG / FTL / B3** - `29ceb3c03de3` Remove 32-bit JSValues. - `857bd4334690` Remove ARMv7 JIT support. - `bfb1b1183bc2` Remove B3/Air graph-coloring register allocator. - `68cde6ba2ad3` Make IRO (Air register allocation) faster. - `83540481435f` DFG: allocate `BasicBlock::intersectionOfPastValuesAtHead` only for OSR-entry targets. - `1566615170ec` DFG fix: `EnumeratorNextUpdateIndexAndMode` must require original array structure for `InBoundsSaneChain`. - `e759fa9dd063` LLInt: inline hot path of `op_enter`. - `9610c2113b45` offlineasm: emit ARM64 register-offset addressing for BaseIndex operands. - `4ebed2479144` Speed up `addSortedRange` via binary search. - `1c006b0b0f62` Fix regex `setLastIndex` on 32-bit. **WebAssembly** - `0d0080ea539d` Enable Memory64 feature flag. - `15aa6fad53e3` Memory64: SIMD support. - `bf0425598904` Memory64: expand declared memory limits. - `862994e2cc37` Memory64: validate table import address-type match. - `184ee4c654bd` Memory64: Table64 in OMG tier. - `d202bedc5ff6` Memory64: Table64 in BBQ tier. - `bf6512f84f7d` Support `WebAssembly.Exception` `options.traceStack` (+ `stack` getter, ctor length = 2). - `24527bbb9ac8` Optimize Wasm JITCallee publication (lock splitting, icache barrier rework). - `1803d6109d98` Speed up `WebAssembly.Table` construction. - `d434a41411a3` BBQ: optimize `br_table` for consecutive same-target runs. - `51d3dbaa278e` IPInt: add `DEFINE_IPINT_THUNK_FOR_ENTRY`. - `244cd98f7986` Fix `generateWasmOpsHeader.py` under non-UTF-8 locales. **Yarr / RegExp** - `581f1d958329` Start end-anchored fixed-size regexps at the only possible position. - `a458a6c1f0a7` v-mode class-set op loop: stop early when no more output possible. - `7c5dbbcba110` Extend `ParenthesesSubpatternTerminal`. - `e1def8f4e5fd` Don't save sibling/ancestor-sibling frame slots for `ParenContext`. - `1e43057f135a` Extend first-character filter further. - `54916608d7d6` Fix non-BMP advance latch; simplify `tryReadUnicodeCharImpl`. - `46a4b17efbe9` `optimizeBOL`: don't filter contents of negative lookaheads. - `b128ddd863ab` Fix dot-star-wrapped optimization for sticky patterns. - `98d0367d2247` Fix: `^` inside a paren that can match empty does not anchor the pattern. **Intl / Temporal** - `09917ef55b0f` Add missing `U_FAILURE(status)` check in `actualLunisolarMonthLength`. **Inspector** - `3722912ff800` / `7be5445e4a22` / `e8c97076834e` / `f3e34dde7c9d` Canvas: instrument & record WebGPU devices/pipelines. - `301d6b2b21f7` Associate WebAssembly module scripts with the fetching resource. - `28b979b1659b` / `479edb2e4395` Site Isolation: implement `Network.loadResource` / `Network.getSerializedCertificate`. ### WTF - `232cebabc1f3` Remove big-endian support and `CPU(NEEDS_ALIGNED_ACCESS)`. - `e5fa5c604438` Upgrade fast_float to 8.2.10. - `a288a8ec809b` Widen `find16`/`find32` SIMD threshold; faster ASCII case-conversion prefix copy. - `6cb1077d85c8` `makeStringByReplacingAll()` now uses SIMD-accelerated `find()`. - `5590f2e70615` Fix `AdaptiveStringSearcher` good-suffix shift table off-by-one. - `f5716f6401ed` Add `preserve_most` to most fastMalloc APIs on ARM64. - `f7a9d16e1531` Add `removeIf()` to `WeakHashSet` / `WeakListHashSet`. - `e1fc460b8f1d` Add `removeIf()` to `RobinHoodHashTable`. - `ff1f31c83dc7` Treat creating/destroying a `CheckedPtr` as no-delete. - `bf15f00ebe95` Remove 12 unused internal-linkage templates (TypeTraits/HashTable/Vector/etc.). - `5b84cf3719fa` Use `__builtin_trap` instead of inline asm under clang static analyzer. - `158f737725b7` Add helpers for Darwin temp/cache directories. - `04e3d47960f3` Limit URL size at IPC boundary (Chrome/Blink parity). - `5daad377031c` / `a7ea27dd3bb6` Enable `-Wthread-safety` on GTK/WPE and fix findings. - `7eb640d408f8` CMake: merge Mac and iOS ports into "Cocoa". - `cfb222f3c4d1` CMake: run `cleandead` at end of configuration. ### bmalloc - `6eaa5ac1f65d` Remove 32-bit libpas support. - `f5716f6401ed` `preserve_most` on fastMalloc APIs (ARM64). - `8b8b3e5ee16c` Fix inverted `MADV_ZERO` support latch in `VMAllocate.cpp`. - `ead6285911f6` libpas: `pas_thread_local_cache_for_all` clobbered its should-go-again result. - `90cbe5e85528` libpas: fix benign read from a deallocated TLC. - `e388877954d1` PGM allocator: fix uninitialized `free_status` misclassifying OOB as UAF. - `05c83a6550b7` libpas: fix `MTE_overrideEnablementForJavaScriptCore=true` incorrectly disabling MTE. - `f01297663d40` / `86fb5e3a4eef` / `d18773ec666e` libpas test coverage (scavenging / zeroing / paged-out pages). ### Breaking/notable for Bun - **32-bit purge**: `29ceb3c03de3` (JSVALUE32_64 removed), `857bd4334690` (ARMv7 JIT removed), `6eaa5ac1f65d` (32-bit libpas removed), `232cebabc1f3` (big-endian + `CPU(NEEDS_ALIGNED_ACCESS)` removed). Any `#if USE(JSVALUE64)` / `CPU(ADDRESS32)` guards in Bun patches are now dead. - **`VM` layout**: `f2f2c2ddf637` deletes `StringRecursionChecker.{h,cpp}` and the `stringRecursionCheck*` fields from `VM.h`. Cyclic `Array.prototype.join`/`toString` now throws `RangeError` instead of returning `""`. - **Module loader**: `90b2ecf79ae3` changes `hostResolveImportedModule` to propagate the import-attribute `type` — check Bun's module loader hook signatures. - **Register allocator**: `bfb1b1183bc2` removes the B3/Air graph-coloring allocator and its `Options::` toggle. - **fastMalloc ABI (ARM64)**: `f5716f6401ed` adds `__attribute__((preserve_most))` to `fastMalloc`/`fastFree` etc. — affects anything calling these across the WTF boundary on arm64. - **BuiltinNames**: `bf6512f84f7d` registers `stackPrivateName` as private-only; `WebAssembly.Exception` constructor `length` becomes 2 and gains a `stack` prototype getter. - **Feature defaults**: `0d0080ea539d` Wasm Memory64 on by default; `319f94b3db4a` `Iterator.prototype.includes` on by default. - **Wasm threading**: `24527bbb9ac8` reworks icache barrier / callee publication and adds `Thread::barrierInstructionCache()` in WTF. <!-- robobun:evidence:begin --> --- **[decide:webkit]** gate passed · iteration 2 · 8 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-3722912f.test.ts" ninja: Entering directory `/workspace/bun/build/debug' [1/182] gen generated_host_exports.rs generated_host_exports.rs: 94 exports (host=3, lazy=10, generic=81, rust=0); 238 extern-C blocks audited [2/182] gen cpp.rs (cppbind) [3/182] 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 [4/182] gen JS modules (bundle-modules) Preprocess modules (8715ms) Bundle modules (63ms) Postprocesss modules (24ms) Bundle Functions (746ms) Generate Code (12ms) [9.57s] Bundled "src/js" for development 2749 kb 193 internal modules 13 native modules 90 internal functions across 19 files [4/181] cargo bun_bin → libbun_rust.a (--target x86_64-unknown-linux-gnu) nightly-2026-07-20-x86_64-unknown-linux-gnu unchanged - rustc 1.99.0-nightly (9f36de775 2026-07-19) [177/181] cxx obj/unified/UnifiedSource-src_jsc_bindings-0.cpp.o FAILED: obj/unified/UnifiedSou ... (truncated) release without fix: all passed bun test v1.4.0-canary.1 (385f528) test/js/bun/jsc/webkit-upgrade-3722912f.test.ts: (pass) WebKit 3722912ff800 upgrade > Iterator.prototype.includes is enabled by default (319f94b3db4a) [0.19ms] (pass) WebKit 3722912ff800 upgrade > cyclic Array.prototype.join throws RangeError (f2f2c2ddf637) [2.51ms] (pass) WebKit 3722912ff800 upgrade > WebAssembly.Exception gains options.traceStack and stack getter (bf6512f84f7d) [0.48ms] (pass) WebKit 3722912ff800 upgrade > typed import attributes resolve through BunTranspiledModule (--isolate) (90b2ecf79ae3) [8.49ms] (pass) WebKit 3722912ff800 upgrade > indirect, namespace and star re-exports link on the JSC ModuleAnalyzer path (90b2ecf79ae3) [22.09ms] 5 pass 0 fail 12 expect() calls Ran 5 tests across 1 file. [152.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-3722912f.test.ts" bun test v1.4.0 (59b0de0) test/js/bun/jsc/webkit-upgrade-3722912f.test.ts: (pass) WebKit 3722912ff800 upgrade > Iterator.prototype.includes is enabled by default (319f94b3db4a) [13.19ms] (pass) WebKit 3722912ff800 upgrade > cyclic Array.prototype.join throws RangeError (f2f2c2ddf637) [10.75ms] (pass) WebKit 3722912ff800 upgrade > WebAssembly.Exception gains options.traceStack and stack getter (bf6512f84f7d) [3.66ms] (pass) WebKit 3722912ff800 upgrade > typed import attributes resolve through BunTranspiledModule (--isolate) (90b2ecf79ae3) [317.28ms] (pass) WebKit 3722912ff800 upgrade > indirect, namespace and star re-exports link on the JSC ModuleAnalyzer path (90b2ecf79ae3) [1138.48ms] 5 pass 0 fail 12 expect() calls Ran 5 tests across 1 file. [3.17s] __F:0:S:0 release with fix: all passed $ bun scripts/build.ts --profile=release [configured] bun-profile → bun (stripped) in 676ms (unchanged) ninja: Entering directory `/workspace/bun/build/release' [1/140] gen generated_host_exports.rs generated_host_exports.rs: 94 exports (host=3, lazy=10, generic=81, rust=0); 238 extern-C blocks audited [2/140] gen cpp.rs (cppbind) [3/140] gen JSSink.{cpp,h,lut.h,rs} generated_jssink.rs: 7 sinks, 84 exported symbols Generating /workspace/bun/build/release/codegen/JSSink.lut.h from /workspace/bun/build/release/codegen/JSSink.lut.txt [4/140] gen JS modules (bundle-modules) Preprocess modules (8727ms) Bundle modules (51ms) Postprocesss modules (106ms) Bundle Functions (687ms) Generate Code (20ms) [9.61s] Bundled "src/js" for production 2559 kb 193 internal modules 13 native modules 90 internal functions across 19 files [4/139] cargo bun_bin → libbun_rust.a (--target x86_64-unknown-linux-gnu) nightly-2026-07-20-x86_64-unknown-linux-gnu unchanged - rustc 1.99.0-nightly (9f36de775 2026-07-19) ^[[1m^[[92m Compiling^[[0m bun_core v0.0.0 (/workspace/bun/src/bun_core) ^[[1m^[[92m Compiling^[[0m bun_runtime v0.0.0 (/workspace/bun/src/runtime) ^[[1m^[[92m Compilin ... (truncated) ``` </details> <details><summary>diff hotspot</summary> ``` scripts/build/deps/webkit.ts | 2 +- src/bundler/analyze_transpiled_module.rs | 38 +++-- src/bundler/linker_context/postProcessJSChunk.rs | 8 +- src/bundler_jsc/analyze_jsc.rs | 135 ++++++++++++---- src/js_printer/lib.rs | 191 +++++++++++++++++------ src/jsc/RuntimeTranspilerCache.rs | 5 +- src/jsc/bindings/BunAnalyzeTranspiledModule.cpp | 39 +++-- test/js/bun/jsc/webkit-upgrade-3722912f.test.ts | 106 +++++++++++++ 8 files changed, 416 insertions(+), 108 deletions(-) ``` </details> **gate history** · 5 passed · 1 rejected · iteration 2 <details><summary>evidence per changed file</summary> ``` file reads edits tests scripts/build/deps/webkit.ts 1 1 0 src/bundler/analyze_transpiled_module.rs 3 3 0 src/bundler/linker_context/postProcessJSChunk.rs 1 1 0 src/bundler_jsc/analyze_jsc.rs 13 15 0 src/js_printer/lib.rs 9 16 0 src/jsc/RuntimeTranspilerCache.rs 2 3 0 src/jsc/bindings/BunAnalyzeTranspiledModule.cpp 8 12 0 test/js/bun/jsc/webkit-upgrade-3722912f.test.ts 2 5 0 ``` </details> <!-- robobun:evidence:end --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Upgrades the WebKit fork to upstream WebKit/WebKit@3722912ff800 (2026-08-02) via oven-sh/WebKit#383. oven-sh/WebKit#383 is merged; `WEBKIT_VERSION` points at the merge commit `e6e37cda216c0292ae68c30c84a9dc8601d0fba5`. Upstream `90b2ecf79ae3` keys `m_loadedModules` on `(specifier, ScriptFetchParameters::Type)` and threads the type through `ImportEntry`, `ExportEntry`, `StarExportEntry`, and `ModuleAnalyzer::appendRequestedModule`. Under `bun test --isolate` (the `BunTranspiledModule` path), Bun'''s synthesized record must agree with what JSC'''s own `ModuleAnalyzer` would produce from the printed source; a mismatch fails the BUN_DEBUG record diff in debug and null-derefs `hostResolveImportedModule` in release. - `analyze_transpiled_module` / `js_printer`: every `RecordKind` now carries one trailing `FetchParameters` slot. `add_import_info_*` and `add_export_info_*` accept it; `finalize()` propagates the source import'''s slot through the Local->Indirect conversion. `RequestedModules` dedupes on `(specifier, Type, phase)`. - `analyze_jsc.rs`: decodes the trailing slot to the JSC `Type` enum and passes it to every `addImportEntry*` / `addIndirectExport` / `addNamespaceExport` / `addStarExport`; buffer validation is per-slot so only the trailing slot accepts the wider `FetchParameters` sentinel range. - `BunAnalyzeTranspiledModule.cpp`: all seven `addImportEntry*` / `add*Export` functions take `uint8_t moduleRequestType` and set `.moduleRequestType` explicitly; `dumpRecordInfo()` prints `type(N)` for import/export/star entries; `static_assert` pins the ordinal values `to_script_fetch_parameters_type()` hardcodes. - `RuntimeTranspilerCache` `EXPECTED_VERSION` -> 25 (esm_record layout change). - 17 merge conflicts resolved in JSC/WTF; fork's `USE(BUN_JSC_ADDITIONS)` hunks preserved. - Fork `ffi/` code adapted to upstream's 32-bit removal (`USE_JSVALUE64` macro deleted, `is64Bit()` removed, `payloadFor` -> `lowWordFor`). - `InspectorDebuggerAgent.cpp`: handle `BunTranspiledModule`/`Synthetic` in new `scriptTypeForScript` switch. - Recorded `01aaa3e0be0c` as ancestor via `-s ours` (oven-sh/WebKit#352 was a squash merge). - `bun run jsc:build:debug` builds and the `jsc` shell runs (`-e 'print(42)'` -> `42`). - `bun run build:local -p '42'` links and runs against the local merged WebKit. - oven-sh/WebKit#383 preview build green on all 38 platform variants. - `bun bd -p 'process.versions.webkit'` -> `preview-pr-383-b9ea4dc5`. - New test `test/js/bun/jsc/webkit-upgrade-3722912f.test.ts`: 4/4 pass with `bun bd test`, 3/4 fail with `USE_SYSTEM_BUN=1 bun test` (old JSC lacks `Iterator.prototype.includes`, returns `""` for cyclic join, `WebAssembly.Exception.length === 1`). Upstream range: WebKit/WebKit@01aaa3e0be0c...3722912ff800 (474 commits total, 110 touching JSC/WTF/bmalloc, Jul 25 → Aug 2 2026). - `29ceb3c03de3` Remove 32-bit JSValues (JSVALUE32_64 and `CPU(NEEDS_ALIGNED_ACCESS)` deleted). - `857bd4334690` Remove ARMv7 JIT support (ARMv7 is CLoop-only now; drops remaining 32-bit/x86 JIT refs). - `232cebabc1f3` Remove big-endian support and platforms without unaligned loads/stores (WTF + JSC). - `6eaa5ac1f65d` Remove 32-bit libpas support. - `bfb1b1183bc2` Remove the B3/Air graph-coloring register allocator (greedy is the only allocator now). - `0d0080ea539d` Enable WebAssembly Memory64 by default (+ Table64/SIMD follow-ups). - `f2f2c2ddf637` Remove `StringRecursionChecker`; cyclic `toString`/`join` now throws RangeError via stack check (spec-correct). - `319f94b3db4a` Enable `Iterator.prototype.includes()` by default. - `90b2ecf79ae3` `hostResolveImportedModule` now honors import-attribute `type` (module loader behavior change). - `f5716f6401ed` Add `preserve_most` calling convention to fastMalloc APIs on ARM64 (perf + ABI of WTF alloc entry points). **Runtime / builtins** - `f2f2c2ddf637` Remove StringRecursionChecker; rely on stack-overflow checks. - `cd91e7f128dd` Add fast flag for `ToPrimitive(Object)` calls in runtime. - `173a0bd6d937` Use `defaultToPrimitiveFastAndNonObservable` in `JSObject::toString`. - `960adeccefcd` Fast operation for `Array#shift`. - `92c6650c7947` Add `JSArrayIterator::next` C++ helper. - `cb1c48b3e95f` Extend `Array.from()` Set fast path to `set.keys()/.values()`. - `4a2e724d6789` Fix: `Array.from(set.keys()/.values())` fast path ignored `Symbol.iterator` overrides. - `73e4c589c1e6` Extend `StringSplitCache` to RegExp separators. - `656d3c36830f` / `1d355c27ea88` 8-byte SWAR fast paths in `JSON.stringify` string copy (same-type & upconvert). - `9f9370cc729f` Fix JSON.stringify regression around `toJSON` check. - `2eb77e9c9473` BigInt: implement Crandall reduction. - `39b1bb9cfc85` BigInt: deploy Comba multiplication more broadly. - `319f94b3db4a` Enable `Iterator.prototype.includes()`. - `0731b27c1b60` `Iterator.zip`: use null-prototype objects for options/underlying iterator. - `90b2ecf79ae3` `hostResolveImportedModule` respects module request import-attribute `type`. - `4f54300b848a` Collect diagnostics when `getDirect` returns zero JSValue in `llint_slow_path_get_by_id`. **Parser / bytecompiler** - `c2beca7a439f` Lexer: scan integer tokens in a single pass. - `72ea806faa21` Use overflow-safe range when choosing a switch jump table. **LLInt / DFG / FTL / B3** - `29ceb3c03de3` Remove 32-bit JSValues. - `857bd4334690` Remove ARMv7 JIT support. - `bfb1b1183bc2` Remove B3/Air graph-coloring register allocator. - `68cde6ba2ad3` Make IRO (Air register allocation) faster. - `83540481435f` DFG: allocate `BasicBlock::intersectionOfPastValuesAtHead` only for OSR-entry targets. - `1566615170ec` DFG fix: `EnumeratorNextUpdateIndexAndMode` must require original array structure for `InBoundsSaneChain`. - `e759fa9dd063` LLInt: inline hot path of `op_enter`. - `9610c2113b45` offlineasm: emit ARM64 register-offset addressing for BaseIndex operands. - `4ebed2479144` Speed up `addSortedRange` via binary search. - `1c006b0b0f62` Fix regex `setLastIndex` on 32-bit. **WebAssembly** - `0d0080ea539d` Enable Memory64 feature flag. - `15aa6fad53e3` Memory64: SIMD support. - `bf0425598904` Memory64: expand declared memory limits. - `862994e2cc37` Memory64: validate table import address-type match. - `184ee4c654bd` Memory64: Table64 in OMG tier. - `d202bedc5ff6` Memory64: Table64 in BBQ tier. - `bf6512f84f7d` Support `WebAssembly.Exception` `options.traceStack` (+ `stack` getter, ctor length = 2). - `24527bbb9ac8` Optimize Wasm JITCallee publication (lock splitting, icache barrier rework). - `1803d6109d98` Speed up `WebAssembly.Table` construction. - `d434a41411a3` BBQ: optimize `br_table` for consecutive same-target runs. - `51d3dbaa278e` IPInt: add `DEFINE_IPINT_THUNK_FOR_ENTRY`. - `244cd98f7986` Fix `generateWasmOpsHeader.py` under non-UTF-8 locales. **Yarr / RegExp** - `581f1d958329` Start end-anchored fixed-size regexps at the only possible position. - `a458a6c1f0a7` v-mode class-set op loop: stop early when no more output possible. - `7c5dbbcba110` Extend `ParenthesesSubpatternTerminal`. - `e1def8f4e5fd` Don't save sibling/ancestor-sibling frame slots for `ParenContext`. - `1e43057f135a` Extend first-character filter further. - `54916608d7d6` Fix non-BMP advance latch; simplify `tryReadUnicodeCharImpl`. - `46a4b17efbe9` `optimizeBOL`: don't filter contents of negative lookaheads. - `b128ddd863ab` Fix dot-star-wrapped optimization for sticky patterns. - `98d0367d2247` Fix: `^` inside a paren that can match empty does not anchor the pattern. **Intl / Temporal** - `09917ef55b0f` Add missing `U_FAILURE(status)` check in `actualLunisolarMonthLength`. **Inspector** - `3722912ff800` / `7be5445e4a22` / `e8c97076834e` / `f3e34dde7c9d` Canvas: instrument & record WebGPU devices/pipelines. - `301d6b2b21f7` Associate WebAssembly module scripts with the fetching resource. - `28b979b1659b` / `479edb2e4395` Site Isolation: implement `Network.loadResource` / `Network.getSerializedCertificate`. - `232cebabc1f3` Remove big-endian support and `CPU(NEEDS_ALIGNED_ACCESS)`. - `e5fa5c604438` Upgrade fast_float to 8.2.10. - `a288a8ec809b` Widen `find16`/`find32` SIMD threshold; faster ASCII case-conversion prefix copy. - `6cb1077d85c8` `makeStringByReplacingAll()` now uses SIMD-accelerated `find()`. - `5590f2e70615` Fix `AdaptiveStringSearcher` good-suffix shift table off-by-one. - `f5716f6401ed` Add `preserve_most` to most fastMalloc APIs on ARM64. - `f7a9d16e1531` Add `removeIf()` to `WeakHashSet` / `WeakListHashSet`. - `e1fc460b8f1d` Add `removeIf()` to `RobinHoodHashTable`. - `ff1f31c83dc7` Treat creating/destroying a `CheckedPtr` as no-delete. - `bf15f00ebe95` Remove 12 unused internal-linkage templates (TypeTraits/HashTable/Vector/etc.). - `5b84cf3719fa` Use `__builtin_trap` instead of inline asm under clang static analyzer. - `158f737725b7` Add helpers for Darwin temp/cache directories. - `04e3d47960f3` Limit URL size at IPC boundary (Chrome/Blink parity). - `5daad377031c` / `a7ea27dd3bb6` Enable `-Wthread-safety` on GTK/WPE and fix findings. - `7eb640d408f8` CMake: merge Mac and iOS ports into "Cocoa". - `cfb222f3c4d1` CMake: run `cleandead` at end of configuration. - `6eaa5ac1f65d` Remove 32-bit libpas support. - `f5716f6401ed` `preserve_most` on fastMalloc APIs (ARM64). - `8b8b3e5ee16c` Fix inverted `MADV_ZERO` support latch in `VMAllocate.cpp`. - `ead6285911f6` libpas: `pas_thread_local_cache_for_all` clobbered its should-go-again result. - `90cbe5e85528` libpas: fix benign read from a deallocated TLC. - `e388877954d1` PGM allocator: fix uninitialized `free_status` misclassifying OOB as UAF. - `05c83a6550b7` libpas: fix `MTE_overrideEnablementForJavaScriptCore=true` incorrectly disabling MTE. - `f01297663d40` / `86fb5e3a4eef` / `d18773ec666e` libpas test coverage (scavenging / zeroing / paged-out pages). - **32-bit purge**: `29ceb3c03de3` (JSVALUE32_64 removed), `857bd4334690` (ARMv7 JIT removed), `6eaa5ac1f65d` (32-bit libpas removed), `232cebabc1f3` (big-endian + `CPU(NEEDS_ALIGNED_ACCESS)` removed). Any `#if USE(JSVALUE64)` / `CPU(ADDRESS32)` guards in Bun patches are now dead. - **`VM` layout**: `f2f2c2ddf637` deletes `StringRecursionChecker.{h,cpp}` and the `stringRecursionCheck*` fields from `VM.h`. Cyclic `Array.prototype.join`/`toString` now throws `RangeError` instead of returning `""`. - **Module loader**: `90b2ecf79ae3` changes `hostResolveImportedModule` to propagate the import-attribute `type` — check Bun's module loader hook signatures. - **Register allocator**: `bfb1b1183bc2` removes the B3/Air graph-coloring allocator and its `Options::` toggle. - **fastMalloc ABI (ARM64)**: `f5716f6401ed` adds `__attribute__((preserve_most))` to `fastMalloc`/`fastFree` etc. — affects anything calling these across the WTF boundary on arm64. - **BuiltinNames**: `bf6512f84f7d` registers `stackPrivateName` as private-only; `WebAssembly.Exception` constructor `length` becomes 2 and gains a `stack` prototype getter. - **Feature defaults**: `0d0080ea539d` Wasm Memory64 on by default; `319f94b3db4a` `Iterator.prototype.includes` on by default. - **Wasm threading**: `24527bbb9ac8` reworks icache barrier / callee publication and adds `Thread::barrierInstructionCache()` in WTF. <!-- robobun:evidence:begin --> --- **[decide:webkit]** gate passed · iteration 2 · 8 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-3722912f.test.ts" ninja: Entering directory `/workspace/bun/build/debug' [1/182] gen generated_host_exports.rs generated_host_exports.rs: 94 exports (host=3, lazy=10, generic=81, rust=0); 238 extern-C blocks audited [2/182] gen cpp.rs (cppbind) [3/182] 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 [4/182] gen JS modules (bundle-modules) Preprocess modules (8715ms) Bundle modules (63ms) Postprocesss modules (24ms) Bundle Functions (746ms) Generate Code (12ms) [9.57s] Bundled "src/js" for development 2749 kb 193 internal modules 13 native modules 90 internal functions across 19 files [4/181] cargo bun_bin → libbun_rust.a (--target x86_64-unknown-linux-gnu) nightly-2026-07-20-x86_64-unknown-linux-gnu unchanged - rustc 1.99.0-nightly (9f36de775 2026-07-19) [177/181] cxx obj/unified/UnifiedSource-src_jsc_bindings-0.cpp.o FAILED: obj/unified/UnifiedSou ... (truncated) release without fix: all passed bun test v1.4.0-canary.1 (385f528) test/js/bun/jsc/webkit-upgrade-3722912f.test.ts: (pass) WebKit 3722912ff800 upgrade > Iterator.prototype.includes is enabled by default (319f94b3db4a) [0.19ms] (pass) WebKit 3722912ff800 upgrade > cyclic Array.prototype.join throws RangeError (f2f2c2ddf637) [2.51ms] (pass) WebKit 3722912ff800 upgrade > WebAssembly.Exception gains options.traceStack and stack getter (bf6512f84f7d) [0.48ms] (pass) WebKit 3722912ff800 upgrade > typed import attributes resolve through BunTranspiledModule (--isolate) (90b2ecf79ae3) [8.49ms] (pass) WebKit 3722912ff800 upgrade > indirect, namespace and star re-exports link on the JSC ModuleAnalyzer path (90b2ecf79ae3) [22.09ms] 5 pass 0 fail 12 expect() calls Ran 5 tests across 1 file. [152.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-3722912f.test.ts" bun test v1.4.0 (59b0de0) test/js/bun/jsc/webkit-upgrade-3722912f.test.ts: (pass) WebKit 3722912ff800 upgrade > Iterator.prototype.includes is enabled by default (319f94b3db4a) [13.19ms] (pass) WebKit 3722912ff800 upgrade > cyclic Array.prototype.join throws RangeError (f2f2c2ddf637) [10.75ms] (pass) WebKit 3722912ff800 upgrade > WebAssembly.Exception gains options.traceStack and stack getter (bf6512f84f7d) [3.66ms] (pass) WebKit 3722912ff800 upgrade > typed import attributes resolve through BunTranspiledModule (--isolate) (90b2ecf79ae3) [317.28ms] (pass) WebKit 3722912ff800 upgrade > indirect, namespace and star re-exports link on the JSC ModuleAnalyzer path (90b2ecf79ae3) [1138.48ms] 5 pass 0 fail 12 expect() calls Ran 5 tests across 1 file. [3.17s] __F:0:S:0 release with fix: all passed $ bun scripts/build.ts --profile=release [configured] bun-profile → bun (stripped) in 676ms (unchanged) ninja: Entering directory `/workspace/bun/build/release' [1/140] gen generated_host_exports.rs generated_host_exports.rs: 94 exports (host=3, lazy=10, generic=81, rust=0); 238 extern-C blocks audited [2/140] gen cpp.rs (cppbind) [3/140] gen JSSink.{cpp,h,lut.h,rs} generated_jssink.rs: 7 sinks, 84 exported symbols Generating /workspace/bun/build/release/codegen/JSSink.lut.h from /workspace/bun/build/release/codegen/JSSink.lut.txt [4/140] gen JS modules (bundle-modules) Preprocess modules (8727ms) Bundle modules (51ms) Postprocesss modules (106ms) Bundle Functions (687ms) Generate Code (20ms) [9.61s] Bundled "src/js" for production 2559 kb 193 internal modules 13 native modules 90 internal functions across 19 files [4/139] cargo bun_bin → libbun_rust.a (--target x86_64-unknown-linux-gnu) nightly-2026-07-20-x86_64-unknown-linux-gnu unchanged - rustc 1.99.0-nightly (9f36de775 2026-07-19) ^[[1m^[[92m Compiling^[[0m bun_core v0.0.0 (/workspace/bun/src/bun_core) ^[[1m^[[92m Compiling^[[0m bun_runtime v0.0.0 (/workspace/bun/src/runtime) ^[[1m^[[92m Compilin ... (truncated) ``` </details> <details><summary>diff hotspot</summary> ``` scripts/build/deps/webkit.ts | 2 +- src/bundler/analyze_transpiled_module.rs | 38 +++-- src/bundler/linker_context/postProcessJSChunk.rs | 8 +- src/bundler_jsc/analyze_jsc.rs | 135 ++++++++++++---- src/js_printer/lib.rs | 191 +++++++++++++++++------ src/jsc/RuntimeTranspilerCache.rs | 5 +- src/jsc/bindings/BunAnalyzeTranspiledModule.cpp | 39 +++-- test/js/bun/jsc/webkit-upgrade-3722912f.test.ts | 106 +++++++++++++ 8 files changed, 416 insertions(+), 108 deletions(-) ``` </details> **gate history** · 5 passed · 1 rejected · iteration 2 <details><summary>evidence per changed file</summary> ``` file reads edits tests scripts/build/deps/webkit.ts 1 1 0 src/bundler/analyze_transpiled_module.rs 3 3 0 src/bundler/linker_context/postProcessJSChunk.rs 1 1 0 src/bundler_jsc/analyze_jsc.rs 13 15 0 src/js_printer/lib.rs 9 16 0 src/jsc/RuntimeTranspilerCache.rs 2 3 0 src/jsc/bindings/BunAnalyzeTranspiledModule.cpp 8 12 0 test/js/bun/jsc/webkit-upgrade-3722912f.test.ts 2 5 0 ``` </details> <!-- robobun:evidence:end --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Upgrades the WebKit fork to upstream WebKit/WebKit@3722912ff800 (2026-08-02) via oven-sh/WebKit#383. oven-sh/WebKit#383 is merged; `WEBKIT_VERSION` points at the merge commit `e6e37cda216c0292ae68c30c84a9dc8601d0fba5`. ## Bun-side changes Upstream `90b2ecf79ae3` keys `m_loadedModules` on `(specifier, ScriptFetchParameters::Type)` and threads the type through `ImportEntry`, `ExportEntry`, `StarExportEntry`, and `ModuleAnalyzer::appendRequestedModule`. Under `bun test --isolate` (the `BunTranspiledModule` path), Bun'''s synthesized record must agree with what JSC'''s own `ModuleAnalyzer` would produce from the printed source; a mismatch fails the BUN_DEBUG record diff in debug and null-derefs `hostResolveImportedModule` in release. - `analyze_transpiled_module` / `js_printer`: every `RecordKind` now carries one trailing `FetchParameters` slot. `add_import_info_*` and `add_export_info_*` accept it; `finalize()` propagates the source import'''s slot through the Local->Indirect conversion. `RequestedModules` dedupes on `(specifier, Type, phase)`. - `analyze_jsc.rs`: decodes the trailing slot to the JSC `Type` enum and passes it to every `addImportEntry*` / `addIndirectExport` / `addNamespaceExport` / `addStarExport`; buffer validation is per-slot so only the trailing slot accepts the wider `FetchParameters` sentinel range. - `BunAnalyzeTranspiledModule.cpp`: all seven `addImportEntry*` / `add*Export` functions take `uint8_t moduleRequestType` and set `.moduleRequestType` explicitly; `dumpRecordInfo()` prints `type(N)` for import/export/star entries; `static_assert` pins the ordinal values `to_script_fetch_parameters_type()` hardcodes. - `RuntimeTranspilerCache` `EXPECTED_VERSION` -> 25 (esm_record layout change). ## WebKit-side changes (oven-sh/WebKit#383) - 17 merge conflicts resolved in JSC/WTF; fork's `USE(BUN_JSC_ADDITIONS)` hunks preserved. - Fork `ffi/` code adapted to upstream's 32-bit removal (`USE_JSVALUE64` macro deleted, `is64Bit()` removed, `payloadFor` -> `lowWordFor`). - `InspectorDebuggerAgent.cpp`: handle `BunTranspiledModule`/`Synthetic` in new `scriptTypeForScript` switch. - Recorded `01aaa3e0be0c` as ancestor via `-s ours` (oven-sh/WebKit#352 was a squash merge). ## How did you verify your code works? - `bun run jsc:build:debug` builds and the `jsc` shell runs (`-e 'print(42)'` -> `42`). - `bun run build:local -p '42'` links and runs against the local merged WebKit. - oven-sh/WebKit#383 preview build green on all 38 platform variants. - `bun bd -p 'process.versions.webkit'` -> `preview-pr-383-b9ea4dc5`. - New test `test/js/bun/jsc/webkit-upgrade-3722912f.test.ts`: 4/4 pass with `bun bd test`, 3/4 fail with `USE_SYSTEM_BUN=1 bun test` (old JSC lacks `Iterator.prototype.includes`, returns `""` for cyclic join, `WebAssembly.Exception.length === 1`). ## JavaScriptCore/WTF/bmalloc changes since 01aaa3e0be0c (Jul 25) Upstream range: WebKit/WebKit@01aaa3e0be0c...3722912ff800 (474 commits total, 110 touching JSC/WTF/bmalloc, Jul 25 → Aug 2 2026). ### Highlights - `29ceb3c03de3` Remove 32-bit JSValues (JSVALUE32_64 and `CPU(NEEDS_ALIGNED_ACCESS)` deleted). - `857bd4334690` Remove ARMv7 JIT support (ARMv7 is CLoop-only now; drops remaining 32-bit/x86 JIT refs). - `232cebabc1f3` Remove big-endian support and platforms without unaligned loads/stores (WTF + JSC). - `6eaa5ac1f65d` Remove 32-bit libpas support. - `bfb1b1183bc2` Remove the B3/Air graph-coloring register allocator (greedy is the only allocator now). - `0d0080ea539d` Enable WebAssembly Memory64 by default (+ Table64/SIMD follow-ups). - `f2f2c2ddf637` Remove `StringRecursionChecker`; cyclic `toString`/`join` now throws RangeError via stack check (spec-correct). - `319f94b3db4a` Enable `Iterator.prototype.includes()` by default. - `90b2ecf79ae3` `hostResolveImportedModule` now honors import-attribute `type` (module loader behavior change). - `f5716f6401ed` Add `preserve_most` calling convention to fastMalloc APIs on ARM64 (perf + ABI of WTF alloc entry points). ### JavaScriptCore **Runtime / builtins** - `f2f2c2ddf637` Remove StringRecursionChecker; rely on stack-overflow checks. - `cd91e7f128dd` Add fast flag for `ToPrimitive(Object)` calls in runtime. - `173a0bd6d937` Use `defaultToPrimitiveFastAndNonObservable` in `JSObject::toString`. - `960adeccefcd` Fast operation for `Array#shift`. - `92c6650c7947` Add `JSArrayIterator::next` C++ helper. - `cb1c48b3e95f` Extend `Array.from()` Set fast path to `set.keys()/.values()`. - `4a2e724d6789` Fix: `Array.from(set.keys()/.values())` fast path ignored `Symbol.iterator` overrides. - `73e4c589c1e6` Extend `StringSplitCache` to RegExp separators. - `656d3c36830f` / `1d355c27ea88` 8-byte SWAR fast paths in `JSON.stringify` string copy (same-type & upconvert). - `9f9370cc729f` Fix JSON.stringify regression around `toJSON` check. - `2eb77e9c9473` BigInt: implement Crandall reduction. - `39b1bb9cfc85` BigInt: deploy Comba multiplication more broadly. - `319f94b3db4a` Enable `Iterator.prototype.includes()`. - `0731b27c1b60` `Iterator.zip`: use null-prototype objects for options/underlying iterator. - `90b2ecf79ae3` `hostResolveImportedModule` respects module request import-attribute `type`. - `4f54300b848a` Collect diagnostics when `getDirect` returns zero JSValue in `llint_slow_path_get_by_id`. **Parser / bytecompiler** - `c2beca7a439f` Lexer: scan integer tokens in a single pass. - `72ea806faa21` Use overflow-safe range when choosing a switch jump table. **LLInt / DFG / FTL / B3** - `29ceb3c03de3` Remove 32-bit JSValues. - `857bd4334690` Remove ARMv7 JIT support. - `bfb1b1183bc2` Remove B3/Air graph-coloring register allocator. - `68cde6ba2ad3` Make IRO (Air register allocation) faster. - `83540481435f` DFG: allocate `BasicBlock::intersectionOfPastValuesAtHead` only for OSR-entry targets. - `1566615170ec` DFG fix: `EnumeratorNextUpdateIndexAndMode` must require original array structure for `InBoundsSaneChain`. - `e759fa9dd063` LLInt: inline hot path of `op_enter`. - `9610c2113b45` offlineasm: emit ARM64 register-offset addressing for BaseIndex operands. - `4ebed2479144` Speed up `addSortedRange` via binary search. - `1c006b0b0f62` Fix regex `setLastIndex` on 32-bit. **WebAssembly** - `0d0080ea539d` Enable Memory64 feature flag. - `15aa6fad53e3` Memory64: SIMD support. - `bf0425598904` Memory64: expand declared memory limits. - `862994e2cc37` Memory64: validate table import address-type match. - `184ee4c654bd` Memory64: Table64 in OMG tier. - `d202bedc5ff6` Memory64: Table64 in BBQ tier. - `bf6512f84f7d` Support `WebAssembly.Exception` `options.traceStack` (+ `stack` getter, ctor length = 2). - `24527bbb9ac8` Optimize Wasm JITCallee publication (lock splitting, icache barrier rework). - `1803d6109d98` Speed up `WebAssembly.Table` construction. - `d434a41411a3` BBQ: optimize `br_table` for consecutive same-target runs. - `51d3dbaa278e` IPInt: add `DEFINE_IPINT_THUNK_FOR_ENTRY`. - `244cd98f7986` Fix `generateWasmOpsHeader.py` under non-UTF-8 locales. **Yarr / RegExp** - `581f1d958329` Start end-anchored fixed-size regexps at the only possible position. - `a458a6c1f0a7` v-mode class-set op loop: stop early when no more output possible. - `7c5dbbcba110` Extend `ParenthesesSubpatternTerminal`. - `e1def8f4e5fd` Don't save sibling/ancestor-sibling frame slots for `ParenContext`. - `1e43057f135a` Extend first-character filter further. - `54916608d7d6` Fix non-BMP advance latch; simplify `tryReadUnicodeCharImpl`. - `46a4b17efbe9` `optimizeBOL`: don't filter contents of negative lookaheads. - `b128ddd863ab` Fix dot-star-wrapped optimization for sticky patterns. - `98d0367d2247` Fix: `^` inside a paren that can match empty does not anchor the pattern. **Intl / Temporal** - `09917ef55b0f` Add missing `U_FAILURE(status)` check in `actualLunisolarMonthLength`. **Inspector** - `3722912ff800` / `7be5445e4a22` / `e8c97076834e` / `f3e34dde7c9d` Canvas: instrument & record WebGPU devices/pipelines. - `301d6b2b21f7` Associate WebAssembly module scripts with the fetching resource. - `28b979b1659b` / `479edb2e4395` Site Isolation: implement `Network.loadResource` / `Network.getSerializedCertificate`. ### WTF - `232cebabc1f3` Remove big-endian support and `CPU(NEEDS_ALIGNED_ACCESS)`. - `e5fa5c604438` Upgrade fast_float to 8.2.10. - `a288a8ec809b` Widen `find16`/`find32` SIMD threshold; faster ASCII case-conversion prefix copy. - `6cb1077d85c8` `makeStringByReplacingAll()` now uses SIMD-accelerated `find()`. - `5590f2e70615` Fix `AdaptiveStringSearcher` good-suffix shift table off-by-one. - `f5716f6401ed` Add `preserve_most` to most fastMalloc APIs on ARM64. - `f7a9d16e1531` Add `removeIf()` to `WeakHashSet` / `WeakListHashSet`. - `e1fc460b8f1d` Add `removeIf()` to `RobinHoodHashTable`. - `ff1f31c83dc7` Treat creating/destroying a `CheckedPtr` as no-delete. - `bf15f00ebe95` Remove 12 unused internal-linkage templates (TypeTraits/HashTable/Vector/etc.). - `5b84cf3719fa` Use `__builtin_trap` instead of inline asm under clang static analyzer. - `158f737725b7` Add helpers for Darwin temp/cache directories. - `04e3d47960f3` Limit URL size at IPC boundary (Chrome/Blink parity). - `5daad377031c` / `a7ea27dd3bb6` Enable `-Wthread-safety` on GTK/WPE and fix findings. - `7eb640d408f8` CMake: merge Mac and iOS ports into "Cocoa". - `cfb222f3c4d1` CMake: run `cleandead` at end of configuration. ### bmalloc - `6eaa5ac1f65d` Remove 32-bit libpas support. - `f5716f6401ed` `preserve_most` on fastMalloc APIs (ARM64). - `8b8b3e5ee16c` Fix inverted `MADV_ZERO` support latch in `VMAllocate.cpp`. - `ead6285911f6` libpas: `pas_thread_local_cache_for_all` clobbered its should-go-again result. - `90cbe5e85528` libpas: fix benign read from a deallocated TLC. - `e388877954d1` PGM allocator: fix uninitialized `free_status` misclassifying OOB as UAF. - `05c83a6550b7` libpas: fix `MTE_overrideEnablementForJavaScriptCore=true` incorrectly disabling MTE. - `f01297663d40` / `86fb5e3a4eef` / `d18773ec666e` libpas test coverage (scavenging / zeroing / paged-out pages). ### Breaking/notable for Bun - **32-bit purge**: `29ceb3c03de3` (JSVALUE32_64 removed), `857bd4334690` (ARMv7 JIT removed), `6eaa5ac1f65d` (32-bit libpas removed), `232cebabc1f3` (big-endian + `CPU(NEEDS_ALIGNED_ACCESS)` removed). Any `#if USE(JSVALUE64)` / `CPU(ADDRESS32)` guards in Bun patches are now dead. - **`VM` layout**: `f2f2c2ddf637` deletes `StringRecursionChecker.{h,cpp}` and the `stringRecursionCheck*` fields from `VM.h`. Cyclic `Array.prototype.join`/`toString` now throws `RangeError` instead of returning `""`. - **Module loader**: `90b2ecf79ae3` changes `hostResolveImportedModule` to propagate the import-attribute `type` — check Bun's module loader hook signatures. - **Register allocator**: `bfb1b1183bc2` removes the B3/Air graph-coloring allocator and its `Options::` toggle. - **fastMalloc ABI (ARM64)**: `f5716f6401ed` adds `__attribute__((preserve_most))` to `fastMalloc`/`fastFree` etc. — affects anything calling these across the WTF boundary on arm64. - **BuiltinNames**: `bf6512f84f7d` registers `stackPrivateName` as private-only; `WebAssembly.Exception` constructor `length` becomes 2 and gains a `stack` prototype getter. - **Feature defaults**: `0d0080ea539d` Wasm Memory64 on by default; `319f94b3db4a` `Iterator.prototype.includes` on by default. - **Wasm threading**: `24527bbb9ac8` reworks icache barrier / callee publication and adds `Thread::barrierInstructionCache()` in WTF. <!-- robobun:evidence:begin --> --- **[decide:webkit]** gate passed · iteration 2 · 8 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-3722912f.test.ts" ninja: Entering directory `/workspace/bun/build/debug' [1/182] gen generated_host_exports.rs generated_host_exports.rs: 94 exports (host=3, lazy=10, generic=81, rust=0); 238 extern-C blocks audited [2/182] gen cpp.rs (cppbind) [3/182] 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 [4/182] gen JS modules (bundle-modules) Preprocess modules (8715ms) Bundle modules (63ms) Postprocesss modules (24ms) Bundle Functions (746ms) Generate Code (12ms) [9.57s] Bundled "src/js" for development 2749 kb 193 internal modules 13 native modules 90 internal functions across 19 files [4/181] cargo bun_bin → libbun_rust.a (--target x86_64-unknown-linux-gnu) nightly-2026-07-20-x86_64-unknown-linux-gnu unchanged - rustc 1.99.0-nightly (9f36de775 2026-07-19) [177/181] cxx obj/unified/UnifiedSource-src_jsc_bindings-0.cpp.o FAILED: obj/unified/UnifiedSou ... (truncated) release without fix: all passed bun test v1.4.0-canary.1 (385f52890) test/js/bun/jsc/webkit-upgrade-3722912f.test.ts: (pass) WebKit 3722912ff800 upgrade > Iterator.prototype.includes is enabled by default (319f94b3db4a) [0.19ms] (pass) WebKit 3722912ff800 upgrade > cyclic Array.prototype.join throws RangeError (f2f2c2ddf637) [2.51ms] (pass) WebKit 3722912ff800 upgrade > WebAssembly.Exception gains options.traceStack and stack getter (bf6512f84f7d) [0.48ms] (pass) WebKit 3722912ff800 upgrade > typed import attributes resolve through BunTranspiledModule (--isolate) (90b2ecf79ae3) [8.49ms] (pass) WebKit 3722912ff800 upgrade > indirect, namespace and star re-exports link on the JSC ModuleAnalyzer path (90b2ecf79ae3) [22.09ms] 5 pass 0 fail 12 expect() calls Ran 5 tests across 1 file. [152.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-3722912f.test.ts" bun test v1.4.0 (59b0de097) test/js/bun/jsc/webkit-upgrade-3722912f.test.ts: (pass) WebKit 3722912ff800 upgrade > Iterator.prototype.includes is enabled by default (319f94b3db4a) [13.19ms] (pass) WebKit 3722912ff800 upgrade > cyclic Array.prototype.join throws RangeError (f2f2c2ddf637) [10.75ms] (pass) WebKit 3722912ff800 upgrade > WebAssembly.Exception gains options.traceStack and stack getter (bf6512f84f7d) [3.66ms] (pass) WebKit 3722912ff800 upgrade > typed import attributes resolve through BunTranspiledModule (--isolate) (90b2ecf79ae3) [317.28ms] (pass) WebKit 3722912ff800 upgrade > indirect, namespace and star re-exports link on the JSC ModuleAnalyzer path (90b2ecf79ae3) [1138.48ms] 5 pass 0 fail 12 expect() calls Ran 5 tests across 1 file. [3.17s] __F:0:S:0 release with fix: all passed $ bun scripts/build.ts --profile=release [configured] bun-profile → bun (stripped) in 676ms (unchanged) ninja: Entering directory `/workspace/bun/build/release' [1/140] gen generated_host_exports.rs generated_host_exports.rs: 94 exports (host=3, lazy=10, generic=81, rust=0); 238 extern-C blocks audited [2/140] gen cpp.rs (cppbind) [3/140] gen JSSink.{cpp,h,lut.h,rs} generated_jssink.rs: 7 sinks, 84 exported symbols Generating /workspace/bun/build/release/codegen/JSSink.lut.h from /workspace/bun/build/release/codegen/JSSink.lut.txt [4/140] gen JS modules (bundle-modules) Preprocess modules (8727ms) Bundle modules (51ms) Postprocesss modules (106ms) Bundle Functions (687ms) Generate Code (20ms) [9.61s] Bundled "src/js" for production 2559 kb 193 internal modules 13 native modules 90 internal functions across 19 files [4/139] cargo bun_bin → libbun_rust.a (--target x86_64-unknown-linux-gnu) nightly-2026-07-20-x86_64-unknown-linux-gnu unchanged - rustc 1.99.0-nightly (9f36de775 2026-07-19) ^[[1m^[[92m Compiling^[[0m bun_core v0.0.0 (/workspace/bun/src/bun_core) ^[[1m^[[92m Compiling^[[0m bun_runtime v0.0.0 (/workspace/bun/src/runtime) ^[[1m^[[92m Compilin ... (truncated) ``` </details> <details><summary>diff hotspot</summary> ``` scripts/build/deps/webkit.ts | 2 +- src/bundler/analyze_transpiled_module.rs | 38 +++-- src/bundler/linker_context/postProcessJSChunk.rs | 8 +- src/bundler_jsc/analyze_jsc.rs | 135 ++++++++++++---- src/js_printer/lib.rs | 191 +++++++++++++++++------ src/jsc/RuntimeTranspilerCache.rs | 5 +- src/jsc/bindings/BunAnalyzeTranspiledModule.cpp | 39 +++-- test/js/bun/jsc/webkit-upgrade-3722912f.test.ts | 106 +++++++++++++ 8 files changed, 416 insertions(+), 108 deletions(-) ``` </details> **gate history** · 5 passed · 1 rejected · iteration 2 <details><summary>evidence per changed file</summary> ``` file reads edits tests scripts/build/deps/webkit.ts 1 1 0 src/bundler/analyze_transpiled_module.rs 3 3 0 src/bundler/linker_context/postProcessJSChunk.rs 1 1 0 src/bundler_jsc/analyze_jsc.rs 13 15 0 src/js_printer/lib.rs 9 16 0 src/jsc/RuntimeTranspilerCache.rs 2 3 0 src/jsc/bindings/BunAnalyzeTranspiledModule.cpp 8 12 0 test/js/bun/jsc/webkit-upgrade-3722912f.test.ts 2 5 0 ``` </details> <!-- robobun:evidence:end --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…gger/cache/completion switches #73 added SourceProviderSourceType::BunTranspiledModule so Bun can attach a pre-computed module record to a SourceProvider and skip JSC's analyze-phase re-parse. Three sites that branch on the provider's sourceType() still match only ::Module, so a BunTranspiledModule provider falls through: - debugger/DebuggerParseData.cpp gatherDebuggerParseDataForSource: falls to the default:false arm, Debugger::resolveBreakpoint gets empty pause positions, and Debugger.setBreakpoint replies "Could not resolve breakpoint" for every line in the script. - runtime/CachedTypes.cpp CachedSourceProvider encode/decode: would RELEASE_ASSERT_NOT_REACHED() if JSC bytecode caching encoded one of these providers. - runtime/Completion.cpp getSourceType: returns ScriptFetchParameters::Type::None instead of JavaScript. (InspectorDebuggerAgent::didParseSource, the fourth site in the original version of this change, is covered since the upstream merge in #383 by scriptTypeForScript.) Currently reachable in Bun via `bun test --isolate` and `--compile` standalone executables; oven-sh/bun#35605 routes every runtime ESM provider through this type and is blocked on this. Each site adds a BUN_JSC_ADDITIONS-gated case that falls through to the Module arm.
Merges upstream WebKit/WebKit
3722912ff800(2026-08-02) into the Bun fork.Previous sync point:
01aaa3e0be0c(2026-07-25). 474 upstream commits, 110 touching JSC/WTF/bmalloc.Merge notes
c8878bda5421records01aaa3e0be0cas an ancestor via-s ours: oven-sh/WebKit Upgrade to upstream WebKit 01aaa3e0be0c #352 landed that upgrade as a squash commit, so without this git computed the merge-base back at2603e9eb41f0(Jul 17) and produced ~380 spurious conflicts. Same pattern asc01c66740939.USE(BUN_JSC_ADDITIONS)hunks preserved.Follow-up fixups for upstream's 32-bit removal (
29ceb3c03de3,857bd4334690)Upstream deleted
USE_JSVALUE64/USE_JSVALUE32_64,is64Bit(), ARMv7, and thepayload/tagsplit. Fork-only code that referenced those:ffi/*: dropped#if USE(JSVALUE64)guards (now always-false), dropped dead!is64Bit()bailout,payloadFor->lowWordFor.tools/JSDollarVM.cpp: dropped&& USE(JSVALUE64)from the FFI helper guards.inspector/agents/InspectorDebuggerAgent.cpp: handleBunTranspiledModule/Syntheticin the newscriptTypeForScriptswitch.CMakeLists.txt: droppedStringRecursionChecker.hfrom the private headers list (removed upstream inf2f2c2ddf637).Bun-side changes required
AbstractModuleRecordnow threadsScriptFetchParameters::Typethrough export/star entries (upstream90b2ecf79ae3). Four call sites insrc/jsc/bindings/BunAnalyzeTranspiledModule.cppneed the extra argument; handled in the bun PR.Verified:
jscdebug build on Linux x64, fullbun run build:locallinks and-p '42'runs.