Skip to content

Merge upstream/main (6cc6aff95e13) + #209 BBQCallee keepalive - #210

Merged
Jarred-Sumner merged 232 commits into
mainfrom
claude/upgrade-20260502-with-pr209
May 2, 2026
Merged

Jarred-Sumner merged 232 commits into
mainfrom
claude/upgrade-20260502-with-pr209

Conversation

@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

WebKit Upgrade: 6ef83cb → 6cc6aff

Syncs oven-sh/WebKit with upstream/main at 6cc6aff95e13 (226 commits, 48 touching JSC/WTF/bmalloc).

Notable JSC changes

Parser / Bytecode

  • 709e4e7e7ec7 Eagerly build AST for likely IIFEs (reworks EagerIIFERegistry, 641+/264-)
  • f3359ae0f15f Add emitBytecodeInConditionContext for comma expressions

Module loader

  • 630d3beef73a Populate module resolution cache only for star/indirect resolutions
  • 66c577c4c2d0 Walk star-export graph once when building a module namespace
  • 69c48a20e920 Clean up AsyncIterator asyncDispose

JIT / B3 / DFG / FTL

  • 334233564d5f Optimize bit-rotate idiom in B3
  • b4cca180f4d0 Teach IntegerRangeOptimizations about missing patterns
  • 2fc620c5697b Compare 8-bit strings a word at a time in DFG/FTL string equality
  • d54aaf250be9 Unroll zero-fill for NewTypedArray with small constant length
  • 85a14b7462fd DFG iterator_next dispatches fast modes by iterator type
  • 3f4f81750dc5 Fix DFG iterator_open/iterator_next dangling failedBlock when fast-mode watchpoint invalidated
  • 7a38dc3cf79c GreedyRegAlloc: loop-aware live-range splitting (off by default) — reverted by 32f417092e79

Runtime / builtins

  • 52ec5e6b9bbc Work around very slow DateCache initialization with recent ICU
  • ecb783a152dc TypedArray#lastIndexOf optimization
  • 90c053c6e513 Array.prototype.lastIndexOf optimization
  • 5efecc395404 String#lastIndexOf optimization
  • 865e2fa8c3e1 Introduce JSC_useFuzzerMode to disable certain $vm features

Wasm

  • 103a40a60d85 Fix wasm type-parsing regression by making RTT formal canonicalized types (large: 101 files, 3025+/2414-)
  • c90b978eee24 IPInt multimemory bounds-check underflow when memory size is 0
  • 066fbb7ab988 IPInt Plan should hold a RefPtr to its callees
  • 714bf5b1e05a Delay PC advancement until after operationCallMayThrow in IPInt
  • 20825c02cda2 JSWebAssemblyTag retains FunctionSignature types
  • 6b357f32c607 Fix use-after-free after growing a resizable buffer on a WebAssembly memory
  • 4c00d7bcee95 JSPI: scan PinballCompletion conservative roots via a GC marking constraint

Build / headers

  • 5cdc5c93d15b Reduce JSC includes in WebCore JS bindings — moves inline functions between headers (Heap.h, Strong.h, IndexingType.h, JSCConfig.h, JSGenericTypedArrayView*.h, CallFrameInlines.h, …); adds JSDOMBindingFacade.h. Source of most merge conflicts; Bun bindings that include JSGenericTypedArrayViewInlines.h for toWrapped/possiblySharedTypedImpl may need to switch to JSGenericTypedArrayView.h.
  • 85d52301a5e3 Fix GCC-13 10-minute build of JSTypedArrayViewPrototype.cpp

WTF / bmalloc

  • 5fa71ca77d1f libpas: use static TLS destructor instead of FLS
  • e9072ad4757f libpas: clean up Windows shutdown handling (upstream now carries our pas_process_is_shutting_down() guard in pas_thread_local_cache.c)
  • a15381777823 StaticStringImpl constructor now takes ASCIILiteral
  • 33bf00e7fc8c Use StaticStringImpl for EventNames to avoid per-thread heap allocations
  • 75aab8192b94 / 23248aa32f59 UnbarrieredMonotonicTime calibration refinement; GenericTimeMixin::approximate() template
  • 7f663a4d9b72 Add FileSystem::traverseDirectory() to avoid redundant lstat() per entry

JSType.h changes

No. No commits touched Source/JavaScriptCore/runtime/JSType.h in this range — src/bun.js/bindings/JSType.zig needs no update.

WebCore bindings codegen changes

Yes, two commits:

  • 5cdc5c93d15b CodeGeneratorJS.pm / preprocess-idls.pl — emits #include "JSDOMBindingFacade.h" and shifts which JSC headers are included by generated bindings. If Bun's src/bun.js/bindings/webcore/ files fail to compile, compare against Source/WebCore/bindings/scripts/test/JS/*.cpp for the new include set.
  • 31f9dc7c7f7e StaticString.pm — sets StringAtom flag on generated StaticStringImpls (no Bun impact).

Included from #209

  • 2c2ff0bbf855 wasm: keep weak BBQCallees alive across repatchNearCall in updateCallsitesToCallUs (cherry-picked on top)

aestes and others added 30 commits April 28, 2026 16:19
… currentPlaybackPosition

https://bugs.webkit.org/show_bug.cgi?id=313557
rdar://175774587

Reviewed by Eric Carlson.

When MediaPlayerPrivateWirelessPlayback is in use, a media element's currentTime is tied to the
MediaDeviceRoute's currentPlaybackPosition, but from WebKit's perspective there is no guarantee
that currentPlaybackPosition will update at a reasonable interval during playback.

To resolve this, added a CMTimebase to MediaPlayerPrivateWirelessPlayback that is configured with
the route's playbackSpeed and currentPlaybackPosition. A timebase observer is added that fires
every 100ms (in the media timeline) to update currentTime. This interval matches the one we use in
MediaPlayerPrivateAVFoundation's periodic time observer, providing smoothed estimated time updates
during wireless playback.

While here, simplified how we handle seeks. Removed the "pending seek" concept from
MediaPlayerPrivateWirelessPlayback and instead assumed that a seek occurs whenever
currentPlaybackPositionDidChange is called.

Tests: media/wireless-playback-media-player/current-time-advances-between-position-updates.html
       media/wireless-playback-media-player/current-time-resumes-after-pause.html
       media/wireless-playback-media-player/current-time-updates-after-rate-change.html
       media/wireless-playback-media-player/current-time-updates-after-route-seek.html
       media/wireless-playback-media-player/current-time-updates-after-seek.html
       media/wireless-playback-media-player/timeupdate-without-position-updates.html

* LayoutTests/media/wireless-playback-media-player/current-time-advances-between-position-updates-expected.txt: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-advances-between-position-updates.html: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-resumes-after-pause-expected.txt: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-resumes-after-pause.html: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-updates-after-rate-change-expected.txt: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-updates-after-rate-change.html: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-updates-after-route-seek-expected.txt: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-updates-after-route-seek.html: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-updates-after-seek-expected.txt: Added.
* LayoutTests/media/wireless-playback-media-player/current-time-updates-after-seek.html: Added.
* LayoutTests/media/wireless-playback-media-player/timeupdate-without-position-updates-expected.txt: Added.
* LayoutTests/media/wireless-playback-media-player/timeupdate-without-position-updates.html: Added.
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp:
* Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h:
* Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.cpp:
(WebCore::MediaPlayerPrivateWirelessPlayback::~MediaPlayerPrivateWirelessPlayback):
(WebCore::MediaPlayerPrivateWirelessPlayback::play):
(WebCore::MediaPlayerPrivateWirelessPlayback::pause):
(WebCore::MediaPlayerPrivateWirelessPlayback::seekToTarget):
(WebCore::MediaPlayerPrivateWirelessPlayback::currentTime const):
(WebCore::MediaPlayerPrivateWirelessPlayback::setRate):
(WebCore::MediaPlayerPrivateWirelessPlayback::currentPlaybackPositionDidChange):
(WebCore::MediaPlayerPrivateWirelessPlayback::ensureTimebase):
(WebCore::MediaPlayerPrivateWirelessPlayback::destroyTimebase):
(WebCore::MediaPlayerPrivateWirelessPlayback::updateTimebaseTimeAndRate):
(WebCore::MediaPlayerPrivateWirelessPlayback::scheduleTimebaseTimer):
(WebCore::MediaPlayerPrivateWirelessPlayback::timebaseTimerFired):
* Source/WebCore/platform/graphics/MediaPlayerPrivateWirelessPlayback.h:

Canonical link: https://commits.webkit.org/312246@main
… text file

https://bugs.webkit.org/show_bug.cgi?id=313572

Reviewed by Jonathan Bedard.

Problem:
  `git-webkit review` relies on the `position` field returned by GitHub's
  pull request comments API to place each inline comment in the generated
  review text file. GitHub computes `position` against its own view of the
  pull request diff, but the diff we fetch via `application/vnd.github.diff`
  is computed against the merge base and can have a different hunk layout
  (e.g. a hunk that has already landed on main is absent from our diff).
  When GitHub's `position` lands outside the range of lines in the diff we
  fetched, the count in `insert_diff_comments` never matches and the
  comment is silently dropped — it never appears in the review text file.

Solution:
  Translate comment locations ourselves using the `line` / `original_line`
  field (the new-file line number the comment applies to), which is
  unambiguous regardless of which diff was used to compute it. A new
  `_line_to_position_map` helper walks the diff we actually fetched,
  parses `@@ -a,b +c,d @@` hunk headers, and records the position within
  our diff for each new-file line. `_diff_comments` now uses that map to
  assign each comment a position that matches the diff being displayed,
  falling back to the raw `position` field only when no line number is
  reported (preserves behavior for file-level comments and legacy/mock
  data used by the existing tests).

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

Canonical link: https://commits.webkit.org/312247@main
…upport

https://bugs.webkit.org/show_bug.cgi?id=313507
rdar://175721231

Reviewed by Sihui Liu.

Prepare BackForwardCache and CachedFrame for multi-process BFCache with
Site Isolation.

Add a new take(BackForwardFrameItemIdentifier, Page*) overload that
looks up cache entries directly by identifier rather than through a
HistoryItem. This is needed because subframe processes suspend and
restore their BFCache entries using the main frame's identifier passed
from the UIProcess, without access to the HistoryItem. The existing
take(HistoryItem&, Page*) now delegates to the new overload.

Add Page ownership validation to both take() and get(). With
multi-process BFCache, a subframe process caches its Page under the
main frame's BackForwardFrameItemIdentifier via SetSubframesSuspended.
If a different Page in the same process later navigates to the same
back/forward item, the FrameLoader's BFCache lookup can find this
subframe entry instead of a cache miss. Since the subframe's CachedPage
has a RemoteFrame main frame with no DocumentLoader, restoring from it
causes a crash. The Page validation ensures each Page only finds its own
cache entries. The take() overload checks before removing from the map
so mismatched entries are preserved for their rightful owner.

In CachedFrame, restore() now null-guards m_document to support
RemoteFrame entries. In an iframe process under Site Isolation, the
Page's main frame is a RemoteFrame with no Document — the CachedFrame
stores the frame tree structure but not a Document. The child frame
reconstruction loop and pruneDetachedChildFrames() are moved outside
the m_document guard so they execute for both LocalFrame and RemoteFrame
paths. CachedFrame::open() adds a RemoteFrame branch that calls
restore() directly, since RemoteFrames have no FrameLoader to drive the
restoration.

In FrameLoader::continueLoadAfterNavigationPolicy, replace the
isInBackForwardCache() check with BackForwardCache::get(). The former
only checks if the key exists in the cache, while the latter also
validates Page ownership. Without this, the FrameLoader can take the
BFCache restoration path using a subframe's CachedPage, stalling the
navigation instead of proceeding to the normal load path that triggers
a process swap via the UIProcess.

No new tests (no behavior change for single-process BFCache).

* Source/WebCore/history/BackForwardCache.cpp:
(WebCore::BackForwardCache::addIfCacheable):
(WebCore::BackForwardCache::take):
(WebCore::BackForwardCache::get):
* Source/WebCore/history/BackForwardCache.h:
* Source/WebCore/history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::open):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):

Canonical link: https://commits.webkit.org/312248@main
rdar://175516150
https://bugs.webkit.org/show_bug.cgi?id=313487

Reviewed by Richard Robinson.

Say JavaScript creates a new window.
That window starts out with a session history for items the user has never interacted with.

Once the user clicks a link on that document, we push a new session history entry that *does*
have user interaction. But when analyzing the back list we notice the previous item had no
interaction, and therefore don't reveal it to the API back/forward list.

The intention is that once the user makes a new entry by interacting, a series of non-interacted-with
items in the back list are coalesced into one logical step in the list.

311615@main accidentally broke that logic if the series of interaction-free items was at the
start of the list (as in the new window case)

This PR fixes that and gives progressions on some other API tests that had some back counts wrong.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKBackForwardListTests.mm

* Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem _loggingStringForTesting]):
* Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListItemPrivate.h:
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::itemStartingAtIndexSkippingItemsAddedByJSWithoutUserGesture const):
(WebKit::WebBackForwardList::loggingString const):
(WebKit::WebBackForwardList::loggingString): Deleted.
* Source/WebKit/UIProcess/WebBackForwardList.h:
* Source/WebKit/UIProcess/WebBackForwardList.swift:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKBackForwardListTests.mm:
(runBackForwardNavigationSkipsItemsWithoutUserGestureTest):
(TEST(WKBackForwardList, BackNavigationHijacking)):
(TEST(WKBackForwardList, ForwardSkipIteratesThroughLeadingConsecutiveJSItems)):
(TEST(WKBackForwardList, BackForwardNavigationSkipsPromiseRedirectWithoutUserInteraction)):
(TEST(WKBackForwardList, BackButtonWorksAfterUserClickFromJSCreatedPage)):

Canonical link: https://commits.webkit.org/312249@main
https://bugs.webkit.org/show_bug.cgi?id=313580
rdar://175796349

Reviewed by Pascoe.

pal.swift is the umbrella module entry that re-exports the underlying
Clang module via @_exported public import pal. Sibling Swift files
(CryptoKit+UnsafeOverlays.swift, CryptoTypes.swift, RegexHelper.swift,
CryptoKitShim.swift) import via the umbrella name (pal.Core.crypto.*,
etc.). The Xcode build compiles pal.swift; the CMake build was missing
it. Add it so the umbrella re-export is present on Mac.

* Source/WebCore/PAL/pal/CMakeLists.txt:

Canonical link: https://commits.webkit.org/312250@main
…g constraint

https://bugs.webkit.org/show_bug.cgi?id=307564
rdar://170156450

Reviewed by Keith Miller.

In the existing JSPI implementation, evacuated Wasm stack slices and callee saves are
registered with the VM and scanned as conservative roots. This creates a potential memory
leak. Here is the reference structure:

    Promise --> PinballCompletion --> EvacuatedStacks, Callee Saves --> ...
                                                ^
                                                |
                                               VM

The Promise is the promise that caused JSPI suspension, and it owns (transitively via
resolution handlers) the PinballCompletion with the suspended computation. Normally, when
the promise is fulfilled or rejected, PinballCompletion unregisters the evacuated stacks
and callee saves it owns, and all these objects become garbage-collectable. Also, if the
promise is forgotten without being resolved and becomes unmarked together with
PinballCompletion, PinballCompletion destructor unregisters the evacuated stacks and
callee saves, so everything is collected. However, if there happens to be a reference
chain starting in evacuated stacks or callee saves and leading back to the promise, this
transitive strong reference from the VM conservative roots will keep the promise and all
the other objects involved alive forever.

This patch prevents such a scenario. It stops treating evacuated stacks and callee saves
as VM conservative roots. Instead, a new GC constraint is introduced for PinballCompletion
objects, to scan the evacuated stacks and callee saves owned by a completion for
conservative roots only when the completion itself is marked.

This change requires some care in the implantation of evacuated stack slices. In the
original implementation the top slice is removed from a PinballCompletion and stored in
PinballHandlerContext by pinballHandlerInitContext(). Control would then return to
assembly code which would prepare the stack space for the slice and then call
pinballHandlerImplantSlice() to copy the slice data onto the stack. This creates a time
window when a stack slice has been taken out of its owner PinballCompletion, but its
contents have not yet been copied onto the stack. If GC were to run in this window, the
slice would not be scanned for conservative roots. This is not an immediate problem
because currently we do nothing in that time window that could start a GC, but it is a
fragility in case the code is changed in the future.

To avoid this fragility, we change the logic so that instead of storing the slice to
implant in PinballHandlerContext, we store the pinball object itself, and the slice is
only taken out of a PinballCompletion immediately before being implanted. We also refactor
the initialization code to make it an initializer of the PinballHandlerContext struct
instead of a static helper function.

Unified sources fixes
---------------------

The change in unified sources order with this patch, combined with the revision of JSC
header includes by https://bugs.webkit.org/show_bug.cgi?id=312585 caused build breakage.
The patch includes these additional changes unrelated to its core logic to fix the
breakage:

- TemporalPlainYearMonth.h / .cpp: Moved the addDurationToYearMonth template definition
  from the header into the .cpp file and added explicit template instantiations for
  AddOrSubtract::Add and AddOrSubtract::Subtract. The header only had a forward
  declaration of JSGlobalObject, so the globalObject->vm() call on line 91 failed with an
  incomplete type error.

- WeakMapImplInlines.h: Added #include "Symbol.h". The canBeHeldWeakly function calls
  asSymbol() which is declared in Symbol.h, but the header only had a forward declaration
  of Symbol via the include chain.

- PinballHandlerContext.cpp: Added #include "StackAlignment.h". The constructor asserts
  !(sliceByteSize % stackAlignmentBytes()), but stackAlignmentBytes() is declared in
  StackAlignment.h which wasn't included directly.

Testing
-------

- Added `jspi-gc-abandoned-suspensions.js` to reproduce the memory leak scenario described
  above.

- Refactoring changes are covered by existing tests.

Canonical link: https://commits.webkit.org/312253@main
https://bugs.webkit.org/show_bug.cgi?id=313535

Reviewed by Ben Nham.

MemoryCache::get() already returns a standalone copy of the blob data
(via copyBlob) to safely release the lock. The second copyBlob in
BlobStorage::get() was copying that result again unnecessarily.

* Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
(WebKit::NetworkCache::BlobStorage::get):

Canonical link: https://commits.webkit.org/312254@main
…t() after closing the web view

https://bugs.webkit.org/show_bug.cgi?id=313566
rdar://175108210

Reviewed by Aditya Keerthi and Abrar Rahman Protyasha.

Return early from a couple `PopUpSOAuthorizationSession` codepaths, in the case where the web view
has already been closed.

Test: SOAuthorizationPopUp.InterceptionCancelAfterClose

* Source/WebKit/UIProcess/Cocoa/SOAuthorization/PopUpSOAuthorizationSession.mm:
(WebKit::PopUpSOAuthorizationSession::abortInternal):
(WebKit::PopUpSOAuthorizationSession::completeInternal):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SOAuthorizationTests.mm:
(TestWebKitAPI::TEST(SOAuthorizationPopUp, InterceptionCancelAfterClose)):

Canonical link: https://commits.webkit.org/312255@main
…om JavaScript

<https://bugs.webkit.org/show_bug.cgi?id=313389>
<rdar://175652847>

Reviewed by Chris Dumez.

Handle the case in `workerObjectDestroyed()` where
`workerGlobalScopeDestroyedInternal()` has already run.  When
that happens, the proxy's thread, context, and identifier are
already cleaned up -- the only remaining work is releasing the
initial construction ref via `deref()`.  Without this,
`workerObjectDestroyed()` returns early on the nullopt
identifier, leaving the ref permanently held.

Also clear `m_queuedEarlyTasks` in
`workerGlobalScopeDestroyedInternal()` because tasks queued
before the worker thread is created capture `Ref { *this }`,
forming a retain cycle through the proxy's own member vector
that prevents destruction even after `deref()` is called.

The leak was introduced in Bug 22723 (254597@main) which added
the null-context early return to `workerObjectDestroyed()` and
added `m_scriptExecutionContext = nullptr` to
`workerGlobalScopeDestroyedInternal()` as part of implementing
nested dedicated workers.

Test using `run-webkit-tests --leaks` with:
- workers/worker-set-delete-terminate-crash.html
- workers/worker-terminate-crash.html

* Source/WebCore/workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::workerObjectDestroyed):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):

Canonical link: https://commits.webkit.org/312256@main
…tml fails

https://bugs.webkit.org/show_bug.cgi?id=313280
rdar://175553453

Reviewed by Ryosuke Niwa.

A cross-origin iframe's initial navigation should appear as a
PerformanceResourceTiming entry in the parent document's performance timeline.

Resource timing does not work in site isolation because
ResourceTiming::addResourceTiming() relies on document.parentDocument and
frame->ownerElement(), which are null in the Site Isolation case.

To address this problem, we send the ResourceTiming data to the parent WCP
via IPC in SubresourceLoader::reportResourceTiming().

Then the parent adds the information to the document's Performance
object through the new ResourceTimingInformation::addResourceTimingToDocument().

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/navigation-preload/resource-timing.https-expected.txt:
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/loader/LocalFrameLoaderClient.cpp:
* Source/WebCore/loader/LocalFrameLoaderClient.h:
* Source/WebCore/loader/ResourceLoadTiming.h:
(WebCore::ResourceLoadTiming::ResourceLoadTiming):
* Source/WebCore/loader/ResourceTiming.cpp:
(WebCore::ResourceTiming::ResourceTiming):
(WebCore::ResourceTiming::isolatedCopy const):
(WebCore::ResourceTiming::isolatedCopy):
* Source/WebCore/loader/ResourceTiming.h:
(WebCore::ResourceTiming::ResourceTiming): Deleted.
* Source/WebCore/loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTimingToDocument):
(WebCore::ResourceTimingInformation::addResourceTiming):
* Source/WebCore/loader/ResourceTimingInformation.h:
* Source/WebCore/loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::reportResourceTiming):
* Source/WebCore/page/RemoteFrame.cpp:
(WebCore::RemoteFrame::addResourceTimingFromChild):
* Source/WebCore/page/RemoteFrame.h:
* Source/WebCore/page/RemoteFrameClient.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::addResourceTimingFromSubframe):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp:
(WebKit::WebRemoteFrameClient::addResourceTimingFromChild):
* Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addResourceTimingFromSubframe):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

Canonical link: https://commits.webkit.org/312257@main
https://bugs.webkit.org/show_bug.cgi?id=306150
rdar://167835037

Reviewed by Dan Glastonbury and Kimmo Kinnunen.

When fragment shader output components are expanded for Metal compatibility/validation,
only the original components were being copied in the conversion function.
The missing components were left uninitialized which led to garbage memory being written
to the framebuffer.

So add a second loop in SaturateScalarOrVectorCommon to zero-initialize the
missing components after copying the original components.

Test: webgl/webgl2-init-missing-fragment-output-components.html

* LayoutTests/webgl/webgl2-init-missing-fragment-output-components-expected.txt: Added.
* LayoutTests/webgl/webgl2-init-missing-fragment-output-components.html: Added.
* Source/ThirdParty/ANGLE/src/compiler/translator/msl/ModifyStruct.cpp:
* Source/ThirdParty/ANGLE/src/tests/gl_tests/GLSLTest.cpp:

Originally-landed-as: 305413.216@safari-7624-branch (0df3411). rdar://173969027
Canonical link: https://commits.webkit.org/312258@main
https://bugs.webkit.org/show_bug.cgi?id=313525

Reviewed by Brady Eidson.

This PR fixes a number of issues with site isolation pertaining to navigate-blob.html

1. Named window lookup fails across processes

When RemotePageProxy::injectPageIntoNewProcess() creates a popup's WebPage in another process,
the opener frame doesn't exist yet (IPC ordering). FrameTree::find() locates the popup by name
but isFrameFamiliarWith() rejects it because the opener is null.

Fix: Deferred opener resolution in WebPage::create() (WebPage.cpp, WebPage.h). Store unresolved
opener ID; when the opener's WebPage is later created in the same process, resolve pending
openers by calling updateOpener().

2. topDocumentSyncData not propagated during main frame process swap

When a main frame navigates cross-origin, didChangeMainDocument() in the new process broadcasts
BroadcastAllDocumentSyncData. This message arrives at ProvisionalPageProxy::didReceiveMessage(),
which has an explicit list of forwarded messages — BroadcastAllDocumentSyncData was not on it.
The message was silently dropped, so the old process (hosting subframes) never learned the new
top-level origin. Blobs created by subframes were registered with the wrong partition key.

Fix: Added BroadcastDocumentSyncData and BroadcastAllDocumentSyncData to the forwarded message
list in ProvisionalPageProxy::didReceiveMessage() (ProvisionalPageProxy.cpp).

3. topDocumentSyncData race conditions during process swap

Page::updateTopDocumentSyncData(Ref<DocumentSyncData>&&) rejected broadcasts when the main frame
was a LocalFrame with a document, so the broadcast arriving before the frame swap was ignored.
In addition, Page::setMainFrame() resets m_topDocumentSyncData unconditionally, wiping
the just-received broadcast when the main frame was replaced with a RemoteFrame.

Fix: Always accept broadcasts in updateTopDocumentSyncData, and only update m_topDocumentSyncData
from the new frame's document when the new frame is a LocalFrame with a document (Page.cpp).

4. Debug assertion failure: null opener frame

WebPageProxy assumed the opener frame still existed when processInheritedFromOpener was true.
With site isolation, the opener frame can be destroyed or replaced between the time the popup was
opened and when it later navigates. The processInheritedFromOpener flag is a sticky property set
at popup creation time. It doesn't track whether the opener frame is still alive. By the time
the popup navigates, the opener frame may have been removed by a process swap, page close, or
DOM mutation.

Fix: Fall back to ensureProcessForSite when the opener frame is gone (WebPageProxy.cpp).

5. Debug assertion in frameWasRemovedInAnotherProcess

frameWasRemovedInAnotherProcess is the normal cross-process frame synchronization message under
site isolation. When a frame is removed in one process, every other process hosting a remote
representation of that frame receives this message to tear down its RemoteFrame.

With the deferred opener resolution fix, more cross-process frame relationships are established
(popups correctly linked to openers across processes). When those frames are later removed
- during navigation, process swap, or DOM manipulation — the synchronization message legitimately
arrives at the WebPage hosting the remote representation. The ASSERT_NOT_REACHED was incorrect
because it treated a normal synchronization path as unreachable.

Fix: Removed the assertion (WebPage.cpp).

Co-authored with Claude.

Test: http/tests/local/blob/navigate-blob.html

* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setMainFrame):
(WebCore::Page::updateTopDocumentSyncData):
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::didReceiveMessage):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::create):
(WebKit::WebPage::frameWasRemovedInAnotherProcess):
* Source/WebKit/WebProcess/WebPage/WebPage.h:

Canonical link: https://commits.webkit.org/312259@main
…ml fails

https://bugs.webkit.org/show_bug.cgi?id=313369

Reviewed by Chris Dumez.

When a subframe navigation triggers a process swap (e.g., localhost -> 127.0.0.1)
and a server redirect sends it back to the parent's site (127.0.0.1 -> localhost),
the UIProcess continues the load in the parent's process. The new process computes
Sec-Fetch-Site fresh - context origin = localhost (inherited from parent), request
URL = localhost - yielding "same-origin". The cross-site redirect through 127.0.0.1
is lost.

Fixed the buy by passing navigation.originalRequest() in LoadParameters's
originalRequest when continuing a redirect in loadContinuingInNonInitiatingProcess
and continueNavigationInNewProcess subframe paths. In computeFetchMetadataSite,
when the DocumentLoader is a continuing load after a provisional load started and
has a different original URL, recompute Sec-Fetch-Site by evaluating the original
URL first, then degrading for the redirect.

Tests: http/wpt/fetch/fetch-metadata-for-sandbox-iframes-reuse.html
       http/wpt/fetch/fetch-metadata-for-sandbox-iframes.html

* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::SubresourceLoader):
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::computeFetchMetadataSite):
(WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
* Source/WebCore/loader/cache/CachedResourceLoader.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):

Canonical link: https://commits.webkit.org/312260@main
….modulemap

https://bugs.webkit.org/show_bug.cgi?id=313567
rdar://175786669

Reviewed by Richard Robinson.

Excluding it is unnecessary and may cause build issues.

No new tests needed.

* Source/WebCore/WebCore_Private.modulemap:

Canonical link: https://commits.webkit.org/312261@main
…k only the elements that have relations-attributes

https://bugs.webkit.org/show_bug.cgi?id=313445
rdar://175681348

Reviewed by Joshua Hoffman.

updateRelationsIfNeeded() previously walked every element in the entire DOM on
every rebuild, checking all 13 relation attributes per element. This is wasteful
because only a small fraction of elements have relation attributes.

Track elements with relation attributes in a WeakHashSet during the initial
full-DOM build, and maintain it incrementally as attributes change. Subsequent
rebuilds (triggered by id changes, reference target changes, etc.) iterate only
the tracked elements instead of the full DOM.

On a page with 1000 DOM elements but only 5 labels and 0 ARIA relation
attributes, the rebuild now walks 5 elements instead of 1000.

This change is a 0.51% improvement on Speedometer 3.1.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::updateRelationsIfNeeded):
(WebCore::AXObjectCache::updateRelationsForTree):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/AccessibilityObject.h:

Canonical link: https://commits.webkit.org/312262@main
… for line ranges spanning nested table boundaries

https://bugs.webkit.org/show_bug.cgi?id=313508
rdar://174349841

Reviewed by Joshua Hoffman.

On macOS, attributedStringForTextMarkerRange used rangeForTextMarkerRange()
to convert text markers to a SimpleRange via CharacterOffset. This path
relies on characterOffsetsInOrder() to determine ordering, which produces
incorrect results for positions spanning across nested table boundaries
(e.g. a text node inside a cell vs. an ancestor tbody position). The
reversed range caused attributedStringForTextMarkerRange to return an
empty string, making VoiceOver read "new line" instead of the actual
line content.

Fix this by matching iOS and switching to simpleRange(), which converts
directly from the text markers' boundary points.

This commit does not address the core bug causing the reversed range. I
attempted to do this, but it ended up being complex, so a FIXME was added instead.
This commit is still a good step forward, decreasing the difference between platforms
and introducing a layout test that reproduces the issue.

* LayoutTests/accessibility/attributed-string-for-line-in-table-expected.txt: Added.
* LayoutTests/accessibility/attributed-string-for-line-in-table.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::characterOffsetsInOrder):
* Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm:
(WebCore::AccessibilityObject::attributedStringForTextMarkerRange const):

Canonical link: https://commits.webkit.org/312263@main
…surface

https://bugs.webkit.org/show_bug.cgi?id=313518

Reviewed by Carlos Garcia Campos.

A child layer's blend mode must blend against the contents of its
enclosing stacking context, not whatever the parent canvas happens
to hold from unrelated ancestors.

* Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp:
(WebCore::SkiaCompositingLayer::computeTransformsAndAnimations):
(WebCore::SkiaCompositingLayer::recursivePaint):
* Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.h:

Canonical link: https://commits.webkit.org/312264@main
Unreviewed build fix.

ResourceTiming.h is a Private framework header, so includes of
sibling headers must use angle-bracket form.

* Source/WebCore/loader/ResourceTiming.h:

Canonical link: https://commits.webkit.org/312265@main
https://bugs.webkit.org/show_bug.cgi?id=313560

Reviewed by Yusuke Suzuki.

This is a follow-up to 312222@main with a small cleanup.

* Source/cmake/WebKitCompilerFlags.cmake: Use cmake_push_check_state()
  and cmake_pop_check_state() consistently to ensure that variables
  are restored to their original values after modifying them for tests.

Canonical link: https://commits.webkit.org/312266@main
…rectory entry

https://bugs.webkit.org/show_bug.cgi?id=313538

Reviewed by Darin Adler.

FileSystem::listDirectory() uses std::filesystem::directory_iterator internally,
which caches each entry's file type from readdir's d_type field. However, it only
returns filenames, discarding the cached type. Callers that need the entry type
then call FileSystem::fileType() per entry, which does a redundant lstat() syscall
to rediscover what directory_iterator already knew.

Add FileSystem::traverseDirectory() that uses directory_iterator directly and
provides both the filename and file type to the callback, reading the type from
directory_entry::symlink_status() which uses the cached d_type without a syscall.
It also avoids materializing all filenames into an intermediate Vector.

Update the four call sites that were doing listDirectory() + fileType() per entry:
NetworkCacheFileSystem, deleteAllFilesModifiedSince, DirectoryFileListCreator,
and DOMFileSystem::listDirectoryWithMetadata.

* Source/WTF/wtf/FileSystem.cpp:
(WTF::FileSystemImpl::deleteAllFilesModifiedSince):
(WTF::FileSystemImpl::traverseDirectory):
* Source/WTF/wtf/FileSystem.h:
* Source/WTF/wtf/playstation/FileSystemPlayStation.cpp:
(WTF::FileSystemImpl::traverseDirectory):
* Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::listDirectoryWithMetadata):
* Source/WebCore/html/DirectoryFileListCreator.cpp:
(WebCore::appendDirectoryFiles):
* Source/WebKit/NetworkProcess/cache/NetworkCacheFileSystem.cpp:
(WebKit::NetworkCache::traverseDirectory):

Canonical link: https://commits.webkit.org/312267@main
https://bugs.webkit.org/show_bug.cgi?id=313345
rdar://175616055

Reviewed by Keith Miller.

1. Make promiseReturnUndefinedOnFulfilled C++ function instead. It is
   just returning an undefined.
2. Clean up asyncDispose code. Using @newResolvedPromise /
   @newRejectedPromise helpers, and coverting entire region with
   try-catch instead.

* Source/JavaScriptCore/builtins/AsyncIteratorPrototype.js:
(overriddenName.string_appeared_here.asyncDispose):
(linkTimeConstant.promiseReturnUndefinedOnFulfilled): Deleted.
* Source/JavaScriptCore/builtins/BuiltinNames.h:
* Source/JavaScriptCore/bytecode/LinkTimeConstant.h:
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSGlobalObject::init):

Canonical link: https://commits.webkit.org/312269@main
https://bugs.webkit.org/show_bug.cgi?id=313010
rdar://175354204

Reviewed by Charlie Wolfe.

A recent change in CFNetwork results in WebKit potentially receiving a @"none"
value for the cookie's SameSite property. This wasn't previously possible
because unspecified and None were handled identically. Since the CFNetwork
change, a debug assertion within WebKit is now being triggered on some sites.
This change adds explicit support for the @"none" SameSite value.

* Source/WebCore/platform/network/cocoa/CookieCocoa.mm:
(WebCore::coreSameSitePolicy):
(WebCore::nsSameSitePolicy):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKHTTPCookieStore.mm:
(TEST(WKHTTPCookieStore, SetCookies)):

Canonical link: https://commits.webkit.org/312270@main
https://bugs.webkit.org/show_bug.cgi?id=313574
rdar://174429082

Reviewed by Lily Spiniolas, Aditya Keerthi, and Abrar Rahman Protyasha.

The problem: The previous fix 310265@main WebKit#60950
expanded the slider thumb's touch hit area and interaction region by 12.5pt when either
dimension is below 48pt. The touch hit area was correct and matched UIKit, but
the interaction region (the visible gaze glow highlight) was too large.

The fix: UIKit does not enlarge the gaze glow, so to match that behaviour, the
interaction region inflation for slider thumbs in inflateRectForInteractionRegion
is removed.

* LayoutTests/interaction-region/form-control-refresh/slider-thumb-native-interaction-region-expected.txt:
* LayoutTests/interaction-region/input-type-range-region-expected.txt:
* Source/WebCore/rendering/cocoa/RenderThemeCocoa.mm:
(WebCore::RenderThemeCocoa::inflateRectForInteractionRegion):

Canonical link: https://commits.webkit.org/312271@main
https://bugs.webkit.org/show_bug.cgi?id=313628

Reviewed by Nikolas Zimmermann.

Update geometry parsing expectations after 312018@main.

* LayoutTests/platform/mac-tahoe-wk2-lbse-text/imported/w3c/web-platform-tests/svg/geometry/parsing/height-computed-expected.txt:
* LayoutTests/platform/mac-tahoe-wk2-lbse-text/imported/w3c/web-platform-tests/svg/geometry/parsing/width-computed-expected.txt:

Canonical link: https://commits.webkit.org/312273@main
djg and others added 17 commits May 1, 2026 16:53
https://bugs.webkit.org/show_bug.cgi?id=313101
rdar://175398649

Reviewed by Richard Robinson.

WebKit fails to compile after Xcode 26.4.

* Source/WTF/wtf/PlatformHave.h: xros26.4.sdk introduces xpc/xpc.h
* Source/WTF/wtf/spi/cocoa/IOTypesSPI.h: Fails module verification
* Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaPlayer.swift:
(WKSLinearMediaPlayer.maybeCreateSpatialOrImmersiveEntity):
Doesn't compile even though xpc can be imported.

Canonical link: https://commits.webkit.org/312459@main
…orExtension.EvaluateScriptInExtensionTabCanReturnPromises is a flaky timeout

https://bugs.webkit.org/show_bug.cgi?id=313860
rdar://176058970

Unreviewed test Gardening

Skipping API tests in mac due to flakiness.

* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKInspectorExtension.mm:
(TEST(WKInspectorExtension, EvaluateScriptInExtensionTabCanReturnPromises)):

Canonical link: https://commits.webkit.org/312460@main
https://bugs.webkit.org/show_bug.cgi?id=313798
rdar://175994613

Reviewed by Cameron McCormack and Brent Fulgham.

Add a RELEASE_LOG that dumps all the settings that have non-default values, and those values.

This is helpful for analyzing diagnostic reports.

* Source/WebKit/Shared/WebPreferencesStore.cpp:
(WebKit::appendValueToStringBuilder):
(WebKit::WebPreferencesStore::logNonDefaultValues const):
* Source/WebKit/Shared/WebPreferencesStore.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Canonical link: https://commits.webkit.org/312461@main
…bKitAPI.WKWebExtension

https://webkit.org/b/313701
rdar://problem/175897544

Reviewed by Kiara Rose.

readyToPresentPopup() is called from delayed callbacks (performSelector:afterDelay:
for content size stabilization, and dispatch_after for the popover show timeout) that
can fire after the extension controller delegate has been torn down. Replace the
assertions with guard clauses that return early when the conditions are no longer met.

The presentsPopupWhenReady() check is placed before clearing m_presentsPopupWhenReady
so the popup can still be presented if a delegate is attached later.

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm:
(WebKit::WebExtensionAction::readyToPresentPopup):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtension.mm:
(TestWebKitAPI::TEST(WKWebExtension, LoadFromDirectory)):
(TestWebKitAPI::TEST(WKWebExtension, LoadFromChromeExtensionArchive)):

Canonical link: https://commits.webkit.org/312462@main
…t(), postMessage(), and executeScript().

https://webkit.org/b/313797
rdar://175797617

Reviewed by Brian Weinstein and Kiara Rose.

This fixes the following WECG issue: w3c/webextensions#919

When an extension responds to a user action — action.onClicked, commands.onCommand, or
menus.onClicked — the gesture should carry through any subsequent sendMessage(), connect(),
port.postMessage(), or executeScript() call so that privileged DOM operations like video.play()
succeed on the receiving end. The gesture was previously dropped at each IPC boundary, leaving
content scripts and background pages with no knowledge that the original call came from deliberate
user interaction with the extension.

The fix threads a bool userGesture flag, captured via processingUserGesture() at each call site,
through the relevant IPC messages. On the receiving end, a std::optional<UserGestureIndicator>
reinstates the gesture only when the flag is set — using std::optional rather than constructing
the indicator unconditionally is required because the destructor always calls
resetShouldPropagateToMicroTask() even with nullopt, which silently breaks async promise resolution
in listeners that use await.

Gestures from content scripts and web pages (externally_connectable) are intentionally not
propagated to extension pages. A user clicking anywhere on a web page can trivially generate a
gesture, so currying that signal to the background would degrade the quality of the gesture as an
indicator of user intent toward the extension — and could be abused to trigger restricted APIs like
permissions.request() without the user explicitly interacting with the extension UI. Only gestures
originating from extension-initiated events carry sufficient signal to be trusted.

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _callAsyncJavaScript:arguments:inFrame:inContentWorld:withUserGesture:completionHandler:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIPortCocoa.mm:
(WebKit::WebExtensionContext::portPostMessage):
(WebKit::WebExtensionContext::addPorts):
(WebKit::WebExtensionContext::portQueuedMessages):
(WebKit::WebExtensionContext::firePortMessageEventsIfNeeded):
(WebKit::WebExtensionContext::fireQueuedPortMessageEventsIfNeeded):
(WebKit::WebExtensionContext::sendQueuedNativePortMessagesIfNeeded):
* Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIRuntimeCocoa.mm:
(WebKit::WebExtensionContext::runtimeSendMessage):
(WebKit::WebExtensionContext::runtimeConnect):
(WebKit::WebExtensionContext::runtimeWebPageSendMessage):
(WebKit::WebExtensionContext::runtimeWebPageConnect):
* Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIScriptingCocoa.mm:
(WebKit::WebExtensionContext::scriptingExecuteScript):
* Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPITabsCocoa.mm:
(WebKit::WebExtensionContext::tabsSendMessage):
(WebKit::WebExtensionContext::tabsConnect):
(WebKit::WebExtensionContext::tabsExecuteScript):
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionDynamicScriptsCocoa.mm:
(WebKit::WebExtensionDynamicScripts::executeScript):
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionMessagePortCocoa.mm:
(WebKit::WebExtensionMessagePort::sendMessage):
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in:
* Source/WebKit/UIProcess/Extensions/WebExtensionDynamicScripts.h:
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIPortCocoa.mm:
(WebKit::WebExtensionAPIPort::postMessage):
(WebKit::WebExtensionAPIPort::fireMessageEventIfNeeded):
(WebKit::WebExtensionContextProxy::dispatchPortMessageEvent):
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIRuntimeCocoa.mm:
(WebKit::WebExtensionAPIRuntime::sendMessage):
(WebKit::WebExtensionAPIRuntime::connect):
(WebKit::WebExtensionContextProxy::internalDispatchRuntimeMessageEvent):
(WebKit::WebExtensionContextProxy::dispatchRuntimeMessageEvent):
(WebKit::WebExtensionContextProxy::internalDispatchRuntimeConnectEvent):
(WebKit::WebExtensionContextProxy::dispatchRuntimeConnectEvent):
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIScriptingCocoa.mm:
(WebKit::WebExtensionAPIScripting::executeScript):
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPITabsCocoa.mm:
(WebKit::WebExtensionAPITabs::sendMessage):
(WebKit::WebExtensionAPITabs::connect):
(WebKit::WebExtensionAPITabs::executeScript):
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPIPort.h:
* Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.h:
* Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.messages.in:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIRuntime.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIRuntime, SendMessageGestureFromContentScriptIsNotPropagated)):
(TestWebKitAPI::TEST(WKWebExtensionAPIRuntime, SendMessageGestureFromPopupIsPropagated)):
(TestWebKitAPI::TEST(WKWebExtensionAPIRuntime, SendMessageWithoutUserGestureFromContentScript)):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIScripting.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIScripting, ExecuteScriptWithDocumentIds)):
(TestWebKitAPI::TEST(WKWebExtensionAPIScripting, ExecuteScriptWithUserGesture)):
(TestWebKitAPI::TEST(WKWebExtensionAPIScripting, ExecuteScriptWithoutUserGesture)):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPITabs.mm:

Canonical link: https://commits.webkit.org/979c7ec417cb
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, SendMessageWithUserGesture)):
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, SendMessageWithoutUserGesture)):
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, ConnectWithUserGesture)):
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, ConnectWithoutUserGesture)):
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, PortPostMessageWithUserGesture)):
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, PortPostMessageWithoutUserGesture)):
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, PortPostMessageGestureFromContentScriptIsNotPropagated)):
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, ExecuteScriptWithUserGesture)):
(TestWebKitAPI::TEST(WKWebExtensionAPITabs, ExecuteScriptWithoutUserGesture)):

Canonical link: https://commits.webkit.org/312463@main
…view coordinates to _WKTextExtractionInteractionResult

https://bugs.webkit.org/show_bug.cgi?id=313836
rdar://176042042

Reviewed by Abrar Rahman Protyasha.

Add plumbing for the targeted element bounds, in text extraction interaction results (in the web
view's coordinate space).

Test: TextExtractionTests.InteractedElementBounds

* Source/WebCore/page/text-extraction/TextExtraction.cpp:
(WebCore::TextExtraction::dispatchInteraction):

Pull out the main interaction logic into a separate helper function, and make `handleInteraction`
wrap that function. This will allow us to easily gather more information about the interaction
target in the future (e.g. selector paths).

(WebCore::TextExtraction::handleInteraction):
* Source/WebCore/page/text-extraction/TextExtraction.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _performInteraction:completionHandler:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtraction.mm:
(-[_WKTextExtractionInteractionResult initWithErrorDescription:summary:interactedElementBounds:]):
(-[_WKTextExtractionInteractionResult interactedElementBounds]):
(-[_WKTextExtractionInteractionResult initWithErrorDescription:summary:]): Deleted.

Add `interactedElementBounds` to the result object's initializer.

* Source/WebKit/UIProcess/API/Cocoa/_WKTextExtractionInternal.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::handleTextExtractionInteraction):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::handleTextExtractionInteraction):
* Source/WebKit/WebProcess/WebPage/WebFrame.h:
* Source/WebKit/WebProcess/WebPage/WebFrame.messages.in:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/TextExtractionTests.mm:
(TestWebKitAPI::(TextExtractionTests, InteractedElementBounds)):

Canonical link: https://commits.webkit.org/312464@main
…ized types

https://bugs.webkit.org/show_bug.cgi?id=313185
rdar://175466443

Reviewed by Yijia Huang.

We have bunch of problems in RTT etc.'s lifetime, and having two
different type representations (TypeDefinition and RTT) on wasm. Also,
recent dependency computation code caused significant performance
regression because of repeated traversal when constructing wasm GC structures.

Let's make wasm GC type handling *significant* simplified.

1. Introduce TypeSectionState and using this during Type section
   parsing. Our model of Type construction becomes significantly
   simpler. All supporting data structures (Subtype, RecursionGroup,
   Projection) are alive *only during Type section parsing*. And we
   convert everything to canonical RTT. And after that, only RTT exists.
2. Remove TypeDefinition completely. We use Subtype, Projection,
   RecursionGroup during Type section parsing. Constructing RTT, and we
   *attempt to register and expose* this pre-baked RTT to the entire
   process, which is managed by TypeInformation singleton. And if it
   succeeds, this RTT is exposed & deduped, and all threads use it. If
   the same structured RTT is already registered, we use it instead and
   destroy the pre-baked RTT.
3. Basically algorithm itself is not changed. But because of (1) and
   (2), a lot of things are much more strictly typed. Also Subtype,
   Projection, RecursionGroup are allocated from SegmentedVector in
   TypeSectionState so we can continue using these pointers and they are
   swept at the end of Type section parsing.
4. RTT now refer to the other RTT. This means that we can create a
   cyclic reference and leak RTT when it happens. Right now, we leak
   them: V8 etc. are leaking them permanently, and they are bound by
   type representation in wasm modules. We are planning to introduce
   cycle-collector to resolve it, but for now, aligning to V8's model.

This resolves performance regression happened via 312331@main.

Tests: JSTests/wasm/stress/cross-module-rtt-identity.js
       JSTests/wasm/stress/recgroup-mutual-cycle.js
       JSTests/wasm/stress/recgroup-order-sensitive.js
       JSTests/wasm/stress/struct-get-cse-multi-match.js

* JSTests/wasm/stress/cross-module-rtt-identity.js: Added.
* JSTests/wasm/stress/recgroup-mutual-cycle.js: Added.
* JSTests/wasm/stress/recgroup-order-sensitive.js: Added.
(u):
(section):
(buildModule):
(buildTestModule):
* JSTests/wasm/stress/struct-get-cse-multi-match.js: Added.
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/JavaScriptCore/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/b3/B3EliminateCommonSubexpressions.cpp:
* Source/JavaScriptCore/b3/B3LowerMacros.cpp:
* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:
* Source/JavaScriptCore/b3/B3Value.cpp:
(JSC::B3::Value::key const):
* Source/JavaScriptCore/b3/B3WasmArrayElementValue.h:
(JSC::B3::WasmArrayElementValue::rtt const):
(JSC::B3::WasmArrayElementValue::WasmArrayElementValue):
(JSC::B3::WasmArrayElementValue::arrayType const): Deleted.
* Source/JavaScriptCore/b3/B3WasmArrayGetValue.cpp:
(JSC::B3::WasmArrayGetValue::WasmArrayGetValue):
(JSC::B3::WasmArrayGetValue::dumpMeta const):
* Source/JavaScriptCore/b3/B3WasmArrayGetValue.h:
* Source/JavaScriptCore/b3/B3WasmArrayNewValue.cpp:
(JSC::B3::WasmArrayNewValue::dumpMeta const):
* Source/JavaScriptCore/b3/B3WasmArrayNewValue.h:
* Source/JavaScriptCore/b3/B3WasmArraySetValue.cpp:
(JSC::B3::WasmArraySetValue::WasmArraySetValue):
(JSC::B3::WasmArraySetValue::dumpMeta const):
* Source/JavaScriptCore/b3/B3WasmArraySetValue.h:
* Source/JavaScriptCore/b3/B3WasmRefTypeCheckValue.h:
* Source/JavaScriptCore/b3/B3WasmStructFieldValue.h:
(JSC::B3::WasmStructFieldValue::rtt const):
(JSC::B3::WasmStructFieldValue::WasmStructFieldValue):
(JSC::B3::WasmStructFieldValue::structType const): Deleted.
* Source/JavaScriptCore/b3/B3WasmStructGetValue.cpp:
(JSC::B3::WasmStructGetValue::WasmStructGetValue):
* Source/JavaScriptCore/b3/B3WasmStructGetValue.h:
* Source/JavaScriptCore/b3/B3WasmStructNewValue.cpp:
(JSC::B3::WasmStructNewValue::dumpMeta const):
* Source/JavaScriptCore/b3/B3WasmStructNewValue.h:
* Source/JavaScriptCore/b3/B3WasmStructSetValue.cpp:
(JSC::B3::WasmStructSetValue::WasmStructSetValue):
* Source/JavaScriptCore/b3/B3WasmStructSetValue.h:
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::BBQJIT):
(JSC::Wasm::BBQJITImpl::BBQJIT::addArguments):
(JSC::Wasm::BBQJITImpl::BBQJIT::getArrayElementType):
(JSC::Wasm::BBQJITImpl::BBQJIT::addTopLevel):
(JSC::Wasm::BBQJITImpl::BBQJIT::addCatch):
(JSC::Wasm::BBQJITImpl::BBQJIT::addCatchToUnreachable):
(JSC::Wasm::BBQJITImpl::BBQJIT::addReturn):
(JSC::Wasm::BBQJITImpl::BBQJIT::saveValuesAcrossCallAndPassArguments):
(JSC::Wasm::BBQJITImpl::BBQJIT::returnValuesFromCall):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitTailCall):
(JSC::Wasm::BBQJITImpl::BBQJIT::addCall):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitIndirectCall):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitIndirectTailCall):
(JSC::Wasm::BBQJITImpl::BBQJIT::addCallIndirect):
(JSC::Wasm::parseAndCompileBBQ):
(JSC::Wasm::BBQJITImpl::BBQJIT::getArrayTypeDefinition): Deleted.
* Source/JavaScriptCore/wasm/WasmBBQJIT.h:
* Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::emitAllocateGCArrayUninitialized):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitStructSet):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitAllocateGCStructUninitialized):
(JSC::Wasm::BBQJITImpl::BBQJIT::addStructNewDefault):
(JSC::Wasm::BBQJITImpl::BBQJIT::addStructNew):
(JSC::Wasm::BBQJITImpl::BBQJIT::addStructGet):
(JSC::Wasm::BBQJITImpl::BBQJIT::addStructSet):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitCatchImpl):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitCatchTableImpl):
(JSC::Wasm::BBQJITImpl::BBQJIT::addCallRef):
* Source/JavaScriptCore/wasm/WasmBBQJIT64.h:
(JSC::Wasm::BBQJITImpl::BBQJIT::emitCCall):
* Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:
(JSC::Wasm::BBQPlan::dumpDisassembly):
(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::compileFunction):
* Source/JavaScriptCore/wasm/WasmBBQPlan.h:
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::JSToWasmCallee::JSToWasmCallee):
* Source/JavaScriptCore/wasm/WasmCallee.h:
* Source/JavaScriptCore/wasm/WasmCallingConvention.h:
(JSC::Wasm::WasmCallingConvention::callInformationFor const):
(JSC::Wasm::JSCallingConvention::callInformationFor const):
(JSC::Wasm::CCallingConventionArmThumb2::numberOfStackResults const):
(JSC::Wasm::CCallingConventionArmThumb2::numberOfStackArguments const):
(JSC::Wasm::CCallingConventionArmThumb2::callInformationFor const):
* Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp:
(JSC::Wasm::ConstExprGenerator::addArguments):
(JSC::Wasm::ConstExprGenerator::addArrayNewDefault):
(JSC::Wasm::ConstExprGenerator::addArrayNewFixed):
(JSC::Wasm::parseExtendedConstExpr):
(JSC::Wasm::evaluateExtendedConstExpr):
* Source/JavaScriptCore/wasm/WasmFormat.h:
(JSC::Wasm::BlockSignature::BlockSignature):
(JSC::Wasm::BlockSignature::argumentCount const):
(JSC::Wasm::BlockSignature::returnCount const):
(JSC::Wasm::BlockSignature::argumentType const):
(JSC::Wasm::BlockSignature::returnType const):
(JSC::Wasm::BlockSignature::hasReturnedV128 const):
(JSC::Wasm::isValueType):
(JSC::Wasm::isInternalref):
(JSC::Wasm::isSubtypeIndex):
(JSC::Wasm::isSubtypeSlow):
(JSC::Wasm::WasmToWasmImportableFunction::offsetOfRTT):
(JSC::Wasm::BlockSignature::hasReturnVector const):
(JSC::Wasm::isRefWithRecursiveReference): Deleted.
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp:
(JSC::Wasm::FunctionIPIntMetadataGenerator::addReturnData):
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.h:
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser::signature const):
(JSC::Wasm::FunctionParser::typeToStringModuleRelative const):
(JSC::Wasm::FunctionParser<Context>::parseBlockSignatureAndNotifySIMDUseIfNeeded):
(JSC::Wasm::FunctionParser<Context>::FunctionParser):
(JSC::Wasm::FunctionParser<Context>::parse):
(JSC::Wasm::FunctionParser<Context>::parseConstantExpression):
(JSC::Wasm::FunctionParser<Context>::parseBody):
(JSC::Wasm::FunctionParser<Context>::parseStructTypeIndex):
(JSC::Wasm::FunctionParser<Context>::parseStructFieldIndex):
(JSC::Wasm::FunctionParser<Context>::parseStructTypeIndexAndFieldIndex):
(JSC::Wasm::FunctionParser<Context>::parseStructFieldManipulation):
(JSC::Wasm::FunctionParser<Context>::parseArrayTypeDefinition):
(JSC::Wasm::FunctionParser<Context>::parseNestedBlocksEagerly):
(JSC::Wasm::FunctionParser<Context>::parseBlockSignature):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
* Source/JavaScriptCore/wasm/WasmGlobal.cpp:
(JSC::Wasm::Global::set):
* Source/JavaScriptCore/wasm/WasmGlobal.h:
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp:
(JSC::Wasm::IPIntGenerator::cachedCallInformationFor):
(JSC::Wasm::IPIntGenerator::IPIntGenerator):
(JSC::Wasm::IPIntGenerator::addArguments):
(JSC::Wasm::IPIntGenerator::addStructNew):
(JSC::Wasm::IPIntGenerator::addStructGet):
(JSC::Wasm::IPIntGenerator::addStructSet):
(JSC::Wasm::IPIntGenerator::addCatch):
(JSC::Wasm::IPIntGenerator::addCatchToUnreachable):
(JSC::Wasm::IPIntGenerator::addThrow):
(JSC::Wasm::IPIntGenerator::addCallCommonData):
(JSC::Wasm::IPIntGenerator::addTailCallCommonData):
(JSC::Wasm::IPIntGenerator::addCall):
(JSC::Wasm::IPIntGenerator::addCallIndirect):
(JSC::Wasm::IPIntGenerator::addCallRef):
(JSC::Wasm::parseAndCompileMetadata):
(JSC::Wasm::parseForDebugInfo):
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.h:
* Source/JavaScriptCore/wasm/WasmIPIntPlan.cpp:
(JSC::Wasm::IPIntPlan::compileFunction):
(JSC::Wasm::IPIntPlan::ensureEntrypoint):
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp:
(JSC::IPInt::copyExceptionStackToPayload):
(JSC::IPInt::copyExceptionPayloadToStack):
(JSC::IPInt::WASM_IPINT_EXTERN_CPP_DECL):
* Source/JavaScriptCore/wasm/WasmJS.h:
* Source/JavaScriptCore/wasm/WasmModule.cpp:
(JSC::Wasm::Module::rttFromFunctionIndexSpace const):
(JSC::Wasm::Module::typeIndexFromFunctionIndexSpace const): Deleted.
* Source/JavaScriptCore/wasm/WasmModule.h:
* Source/JavaScriptCore/wasm/WasmModuleInformation.h:
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::toB3ResultType):
(JSC::Wasm::OMGIRGenerator::addInlinedArguments):
(JSC::Wasm::OMGIRGenerator::addArguments):
(JSC::Wasm::OMGIRGenerator::fillCallResults):
(JSC::Wasm::emitWasmCallStackResultsAndSPRestore):
(JSC::Wasm::OMGIRGenerator::emitIndirectCall):
(JSC::Wasm::OMGIRGenerator::emitStructSet):
(JSC::Wasm::OMGIRGenerator::getArrayRTT):
(JSC::Wasm::OMGIRGenerator::getArrayElementType):
(JSC::Wasm::OMGIRGenerator::getArrayRefType):
(JSC::Wasm::OMGIRGenerator::addArrayNew):
(JSC::Wasm::OMGIRGenerator::addArrayNewDefault):
(JSC::Wasm::OMGIRGenerator::addArrayNewFixed):
(JSC::Wasm::OMGIRGenerator::addArrayGet):
(JSC::Wasm::OMGIRGenerator::emitArraySetUncheckedWithoutWriteBarrier):
(JSC::Wasm::OMGIRGenerator::addArraySet):
(JSC::Wasm::OMGIRGenerator::addStructNew):
(JSC::Wasm::OMGIRGenerator::addStructNewDefault):
(JSC::Wasm::OMGIRGenerator::addStructGet):
(JSC::Wasm::OMGIRGenerator::addStructSet):
(JSC::Wasm::OMGIRGenerator::addCatch):
(JSC::Wasm::OMGIRGenerator::addCatchToUnreachable):
(JSC::Wasm::OMGIRGenerator::emitCatchTableImpl):
(JSC::Wasm::OMGIRGenerator::addInlinedReturn):
(JSC::Wasm::OMGIRGenerator::addReturn):
(JSC::Wasm::OMGIRGenerator::createCallPatchpoint):
(JSC::Wasm::prepareForTailCallImpl):
(JSC::Wasm::OMGIRGenerator::createTailCallPatchpoint):
(JSC::Wasm::OMGIRGenerator::emitInlineDirectCall):
(JSC::Wasm::OMGIRGenerator::addCall):
(JSC::Wasm::OMGIRGenerator::emitDirectCall):
(JSC::Wasm::OMGIRGenerator::tryInliningPolymorphicCalls):
(JSC::Wasm::OMGIRGenerator::addCallIndirect):
(JSC::Wasm::OMGIRGenerator::addCallRef):
(JSC::Wasm::parseAndCompileOMG):
(JSC::Wasm::OMGIRGenerator::getTypeDefinition): Deleted.
(JSC::Wasm::OMGIRGenerator::getArrayTypeDefinition): Deleted.
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.h:
* Source/JavaScriptCore/wasm/WasmOMGPlan.cpp:
(JSC::Wasm::OMGPlan::dumpDisassembly):
(JSC::Wasm::OMGPlan::work):
* Source/JavaScriptCore/wasm/WasmOMGPlan.h:
* Source/JavaScriptCore/wasm/WasmOSREntryPlan.cpp:
(JSC::Wasm::OSREntryPlan::dumpDisassembly):
(JSC::Wasm::OSREntryPlan::work):
* Source/JavaScriptCore/wasm/WasmOSREntryPlan.h:
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
(JSC::Wasm::JSC_DEFINE_NOEXCEPT_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmOperations.h:
* Source/JavaScriptCore/wasm/WasmOperationsInlines.h:
(JSC::Wasm::arrayNew):
(JSC::Wasm::arrayNewFixed):
(JSC::Wasm::arrayNewData):
(JSC::Wasm::arrayNewElem):
(JSC::Wasm::arrayGet):
(JSC::Wasm::arraySet):
(JSC::Wasm::structNew):
(JSC::Wasm::refCast):
* Source/JavaScriptCore/wasm/WasmParser.h:
(JSC::Wasm::ParserBase::ParserBase):
(JSC::Wasm::ParserBase::parseHeapType):
(JSC::Wasm::ParserBase::parseValueType):
* Source/JavaScriptCore/wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseType):
(JSC::Wasm::SectionParser::parseImport):
(JSC::Wasm::SectionParser::parseFunction):
(JSC::Wasm::SectionParser::parseStart):
(JSC::Wasm::SectionParser::parseInitExpr):
(JSC::Wasm::SectionParser::parseFunctionType):
(JSC::Wasm::SectionParser::parseStructType):
(JSC::Wasm::SectionParser::parseArrayType):
(JSC::Wasm::SectionParser::parseRecursionGroup):
(JSC::Wasm::SectionParser::checkStructuralSubtype):
(JSC::Wasm::SectionParser::checkSubtypeValidity):
(JSC::Wasm::SectionParser::parseSubtype):
(JSC::Wasm::SectionParser::parseException):
* Source/JavaScriptCore/wasm/WasmSectionParser.h:
* Source/JavaScriptCore/wasm/WasmTable.cpp:
(JSC::Wasm::Table::Table):
(JSC::Wasm::FuncRefTable::FuncRefTable):
(JSC::Wasm::FuncRefTable::clear):
* Source/JavaScriptCore/wasm/WasmTable.h:
* Source/JavaScriptCore/wasm/WasmTag.cpp:
(JSC::Wasm::Tag::jsExceptionTag):
* Source/JavaScriptCore/wasm/WasmTag.h:
* Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp:
(JSC::Wasm::RTT::tryCreateFunction):
(JSC::Wasm::RTT::tryCreateStruct):
(JSC::Wasm::RTT::tryCreateArray):
(JSC::Wasm::RTT::isSubRTT const):
(JSC::Wasm::RTT::isStrictSubRTT const):
(JSC::Wasm::RTT::toString const):
(JSC::Wasm::RTTGroup::~RTTGroup):
(JSC::Wasm::RTT::rewriteInternalRefs):
(JSC::Wasm::RTT::clearReferencedRTTs):
(JSC::Wasm::RTT::dump const):
(JSC::Wasm::TypeInformation::signatureForJSException):
(JSC::Wasm::TypeInformation::TypeInformation):
(JSC::Wasm::TypeInformation::extractExternalRTT):
(JSC::Wasm::encodeRef):
(JSC::Wasm::hashEncodedRef):
(JSC::Wasm::hashType):
(JSC::Wasm::equalTypes):
(JSC::Wasm::hashFieldType):
(JSC::Wasm::equalFieldTypes):
(JSC::Wasm::hashRTTForRecGroup):
(JSC::Wasm::equalRTTsForRecGroup):
(JSC::Wasm::GroupLookup::operator() const):
(JSC::Wasm::SingletonSelfRef::operator() const):
(JSC::Wasm::TypeInformation::typeDefinitionForFunction):
(JSC::Wasm::TypeInformation::rttForFunction):
(JSC::Wasm::TypeInformation::typeDefinitionForStruct):
(JSC::Wasm::TypeInformation::typeDefinitionForArray):
(JSC::Wasm::TypeInformation::isRefWithRecursiveReference):
(JSC::Wasm::TypeInformation::getCanonicalRTT):
(JSC::Wasm::CanonicalRecursionGroupEntryHash::hash):
(JSC::Wasm::CanonicalRecursionGroupEntryHash::equal):
(JSC::Wasm::CanonicalRecursionGroupEntry::operator== const):
(JSC::Wasm::CanonicalSingletonEntryHash::hash):
(JSC::Wasm::CanonicalSingletonEntryHash::equal):
(JSC::Wasm::CanonicalSingletonEntry::operator== const):
(JSC::Wasm::TypeInformation::canonicalizeRecursionGroup):
(JSC::Wasm::TypeInformation::canonicalizeSingleton):
(JSC::Wasm::TypeInformation::canonicalizeRecursionGroupImpl):
(JSC::Wasm::TypeInformation::canonicalizeSingletonImpl):
(JSC::Wasm::TypeInformation::canonicalizeStandaloneRTT):
(JSC::Wasm::TypeInformation::canonicalizeStandaloneRTTImpl):
(JSC::Wasm::TypeInformation::isReferenceValueAssignable):
(JSC::Wasm::TypeInformation::tryCleanup):
(JSC::Wasm::Type::definitelyIsWasmGCObjectOrNull const):
(JSC::Wasm::Type::dump const):
(JSC::Wasm::TypeDefinition::toString const): Deleted.
(JSC::Wasm::TypeDefinition::dump const): Deleted.
(JSC::Wasm::FunctionSignature::toString const): Deleted.
(JSC::Wasm::FunctionSignature::dump const): Deleted.
(JSC::Wasm::FunctionSignature::FunctionSignature): Deleted.
(JSC::Wasm::StructType::toString const): Deleted.
(JSC::Wasm::StructType::dump const): Deleted.
(JSC::Wasm::StructType::StructType): Deleted.
(JSC::Wasm::ArrayType::ArrayType): Deleted.
(JSC::Wasm::ArrayType::toString const): Deleted.
(JSC::Wasm::ArrayType::dump const): Deleted.
(JSC::Wasm::RecursionGroup::RecursionGroup): Deleted.
(JSC::Wasm::RecursionGroup::toString const): Deleted.
(JSC::Wasm::RecursionGroup::dump const):
(JSC::Wasm::Projection::Projection): Deleted.
(JSC::Wasm::Projection::toString const): Deleted.
(JSC::Wasm::Projection::dump const):
(JSC::Wasm::Subtype::Subtype): Deleted.
(JSC::Wasm::Subtype::toString const): Deleted.
(JSC::Wasm::Subtype::dump const):
(JSC::Wasm::TypeDefinition::cleanup): Deleted.
(JSC::Wasm::Subtype::cleanup): Deleted.
(JSC::Wasm::Projection::cleanup): Deleted.
(JSC::Wasm::RecursionGroup::cleanup): Deleted.
(JSC::Wasm::computeSignatureHash): Deleted.
(JSC::Wasm::computeStructTypeHash): Deleted.
(JSC::Wasm::computeArrayTypeHash): Deleted.
(JSC::Wasm::computeRecursionGroupHash):
(JSC::Wasm::computeProjectionHash):
(JSC::Wasm::computeSubtypeHash):
(JSC::Wasm::TypeDefinition::hash const): Deleted.
(JSC::Wasm::FunctionSignature::tryCreate): Deleted.
(JSC::Wasm::StructType::tryCreate): Deleted.
(JSC::Wasm::ArrayType::tryCreate): Deleted.
(JSC::Wasm::RecursionGroup::tryCreate): Deleted.
(JSC::Wasm::Projection::tryCreate): Deleted.
(JSC::Wasm::Subtype::tryCreate): Deleted.
(JSC::Wasm::TypeDefinition::substitute): Deleted.
(JSC::Wasm::substituteParent): Deleted.
(JSC::Wasm::TypeDefinition::replacePlaceholders const): Deleted.
(JSC::Wasm::TypeDefinition::unrollSlow const): Deleted.
(JSC::Wasm::TypeDefinition::expand const): Deleted.
(JSC::Wasm::TypeDefinition::hasRecursiveReference const): Deleted.
(JSC::Wasm::TypeDefinition::isFinalType const): Deleted.
(JSC::Wasm::RTT::RTT):
(JSC::Wasm::RTT::tryCreate):
(JSC::Wasm::FunctionParameterTypes::hash): Deleted.
(JSC::Wasm::FunctionParameterTypes::equal): Deleted.
(JSC::Wasm::FunctionParameterTypes::translate): Deleted.
(JSC::Wasm::StructParameterTypes::hash): Deleted.
(JSC::Wasm::StructParameterTypes::equal): Deleted.
(JSC::Wasm::StructParameterTypes::translate): Deleted.
(JSC::Wasm::ArrayParameterTypes::hash): Deleted.
(JSC::Wasm::ArrayParameterTypes::equal): Deleted.
(JSC::Wasm::ArrayParameterTypes::translate): Deleted.
(JSC::Wasm::RecursionGroupParameterTypes::hash): Deleted.
(JSC::Wasm::RecursionGroupParameterTypes::equal): Deleted.
(JSC::Wasm::RecursionGroupParameterTypes::translate): Deleted.
(JSC::Wasm::ProjectionParameterTypes::hash): Deleted.
(JSC::Wasm::ProjectionParameterTypes::equal): Deleted.
(JSC::Wasm::ProjectionParameterTypes::translate): Deleted.
(JSC::Wasm::SubtypeParameterTypes::hash): Deleted.
(JSC::Wasm::SubtypeParameterTypes::equal): Deleted.
(JSC::Wasm::SubtypeParameterTypes::translate): Deleted.
(JSC::Wasm::TypeInformation::typeDefinitionForRecursionGroup): Deleted.
(JSC::Wasm::TypeInformation::typeDefinitionForProjection): Deleted.
(JSC::Wasm::TypeInformation::typeDefinitionForSubtype): Deleted.
(JSC::Wasm::TypeInformation::getPlaceholderProjection): Deleted.
(JSC::Wasm::TypeInformation::addCachedUnrolling): Deleted.
(JSC::Wasm::TypeInformation::tryGetCachedUnrolling): Deleted.
(JSC::Wasm::TypeInformation::registerCanonicalRTTForType): Deleted.
(JSC::Wasm::TypeInformation::createCanonicalRTTForType): Deleted.
(JSC::Wasm::typeHash): Deleted.
(JSC::Wasm::WebAssemblyGCTypeDependencies::WebAssemblyGCTypeDependencies): Deleted.
(JSC::Wasm::appendToWorkIfNeeded): Deleted.
(JSC::Wasm::WebAssemblyGCTypeDependencies::process): Deleted.
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
(JSC::Wasm::TypeSlot::TypeSlot):
(JSC::Wasm::StructFieldEntry::StructFieldEntry):
(JSC::Wasm::RTTFunctionPayload::RTTFunctionPayload):
(JSC::Wasm::RTTFunctionPayload::argumentCount const):
(JSC::Wasm::RTTFunctionPayload::returnCount const):
(JSC::Wasm::RTTFunctionPayload::returnType const):
(JSC::Wasm::RTTFunctionPayload::argumentType const):
(JSC::Wasm::RTTFunctionPayload::returnsVoid const):
(JSC::Wasm::RTTFunctionPayload::argumentsOrResultsIncludeI64 const):
(JSC::Wasm::RTTFunctionPayload::argumentsOrResultsIncludeV128 const):
(JSC::Wasm::RTTFunctionPayload::argumentsOrResultsIncludeExnref const):
(JSC::Wasm::RTTFunctionPayload::hasRecursiveReference const):
(JSC::Wasm::RTTFunctionPayload::visitChildrenRTT):
(JSC::Wasm::RTTStructPayload::RTTStructPayload):
(JSC::Wasm::RTTStructPayload::fieldCount const):
(JSC::Wasm::RTTStructPayload::offsetOfFieldInPayload const):
(JSC::Wasm::RTTStructPayload::instancePayloadSize const):
(JSC::Wasm::RTTStructPayload::hasRefFieldTypes const):
(JSC::Wasm::RTTStructPayload::hasRecursiveReference const):
(JSC::Wasm::RTTStructPayload::visitChildrenRTT):
(JSC::Wasm::RTTArrayPayload::RTTArrayPayload):
(JSC::Wasm::RTTArrayPayload::hasRecursiveReference const):
(JSC::Wasm::RTTArrayPayload::visitChildrenRTT):
(JSC::Wasm::CanonicalRecursionGroupEntry::CanonicalRecursionGroupEntry):
(JSC::Wasm::CanonicalRecursionGroupEntry::isHashTableDeletedValue const):
(JSC::Wasm::CanonicalSingletonEntry::CanonicalSingletonEntry):
(JSC::Wasm::CanonicalSingletonEntry::isHashTableDeletedValue const):
(WTF::HashTraits<JSC::Wasm::CanonicalRecursionGroupEntry>::isEmptyValue):
(JSC::Wasm::TypeDefinition::is const): Deleted.
(JSC::Wasm::TypeDefinition::as): Deleted.
(JSC::Wasm::TypeDefinition::as const): Deleted.
(JSC::Wasm::TypeDefinition::operator== const): Deleted.
(JSC::Wasm::TypeDefinition::unroll const): Deleted.
(JSC::Wasm::TypeDefinition::unownedIndex const): Deleted.
(JSC::Wasm::TypeDefinition::TypeDefinition): Deleted.
(JSC::Wasm::Type::dump const):
(JSC::Wasm::TypeHash::TypeHash): Deleted.
(JSC::Wasm::TypeHash::operator== const): Deleted.
(JSC::Wasm::TypeHash::equal): Deleted.
(JSC::Wasm::TypeHash::hash): Deleted.
(JSC::Wasm::TypeHash::isHashTableDeletedValue const): Deleted.
(JSC::Wasm::TypeInformation::thunkFor const): Deleted.
* Source/JavaScriptCore/wasm/WasmTypeDefinitionInlines.h:
(JSC::Wasm::TypeInformation::tryGetRTT):
(JSC::Wasm::TypeInformation::typeDefinitionForStructFromProvider):
(JSC::Wasm::TypeInformation::typeDefinitionForFunctionFromProviders):
(JSC::Wasm::TypeDefinition::index const): Deleted.
(JSC::Wasm::TypeInformation::get): Deleted.
(JSC::Wasm::TypeInformation::getFunctionSignature): Deleted.
(): Deleted.
(JSC::Wasm::TypeInformation::getRef): Deleted.
* Source/JavaScriptCore/wasm/WasmTypeSectionState.cpp: Added.
(JSC::Wasm::computeProjectionHash):
(JSC::Wasm::ProjectionHash::hash):
(JSC::Wasm::ProjectionHash::equal):
(JSC::Wasm::ParsedDef::hasRecursiveReference const):
(JSC::Wasm::ParsedDef::index const):
(JSC::Wasm::ParsedDef::canonicalRTT const):
(JSC::Wasm::RecursionGroup::emptySingleton):
(JSC::Wasm::RecursionGroup::toString const):
(JSC::Wasm::RecursionGroup::dump const):
(JSC::Wasm::Projection::toString const):
(JSC::Wasm::Projection::dump const):
(JSC::Wasm::Subtype::toString const):
(JSC::Wasm::Subtype::dump const):
(JSC::Wasm::Subtype::hasRecursiveReference const):
(JSC::Wasm::ProjectionLookupTranslator::hash):
(JSC::Wasm::ProjectionLookupTranslator::equal):
(JSC::Wasm::TypeSectionState::createRecursionGroup):
(JSC::Wasm::TypeSectionState::createProjection):
(JSC::Wasm::TypeSectionState::createSubtype):
(JSC::Wasm::TypeSectionState::createPlaceholderProjection):
(JSC::Wasm::TypeSectionState::substitute):
(JSC::Wasm::TypeSectionState::substituteParent):
(JSC::Wasm::TypeSectionState::registerCanonicalRTT):
(JSC::Wasm::TypeSectionState::createCanonicalRTT):
* Source/JavaScriptCore/wasm/WasmTypeSectionState.h: Added.
(JSC::Wasm::untagProjection):
(JSC::Wasm::untagSubtype):
(JSC::Wasm::tagAsSubtype):
(JSC::Wasm::tagAsProjection):
(JSC::Wasm::isPlaceholderRef):
(JSC::Wasm::ParsedDef::ParsedDef):
(JSC::Wasm::ParsedDef::isRTT const):
(JSC::Wasm::ParsedDef::isSubtype const):
(JSC::Wasm::ParsedDef::asRTT const):
(JSC::Wasm::ParsedDef::asSubtype const):
(JSC::Wasm::ParsedDef::operator! const):
(JSC::Wasm::ParsedDef::operator bool const):
* Source/JavaScriptCore/wasm/debugger/WasmModuleDebugInfo.cpp:
(JSC::Wasm::ModuleDebugInfo::ensureFunctionDebugInfo):
* Source/JavaScriptCore/wasm/debugger/tests/TestUtilities.cpp:
(WasmDebugInfoTest::parseAndVerifyDebugInfoImpl):
* Source/JavaScriptCore/wasm/js/JSToWasm.cpp:
(JSC::Wasm::marshallJSResult):
(JSC::Wasm::usedCalleeSaveRegisters):
(JSC::Wasm::RTT::jsToWasmICEntrypoint const):
(JSC::Wasm::FunctionSignature::jsToWasmICEntrypoint const): Deleted.
* Source/JavaScriptCore/wasm/js/JSWebAssemblyArray.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyArrayInlines.h:
(JSC::JSWebAssemblyArray::createStructure):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::initElementSegment):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::rttFromFunctionIndexSpace const):
(JSC::JSWebAssemblyModule::typeIndexFromFunctionIndexSpace const): Deleted.
* Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp:
(JSC::JSWebAssemblyStruct::tryCreate):
(JSC::JSWebAssemblyStruct::getVector const):
(JSC::JSWebAssemblyStruct::visitChildrenImpl):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.h:
(JSC::JSWebAssemblyStruct::createStructure):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyTag.h:
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):
* Source/JavaScriptCore/wasm/js/WebAssemblyBuiltin.cpp:
(JSC::WebAssemblyArrayMutI16TypeExpectation::isValid const):
(JSC::WebAssemblyBuiltinSignature::isValid const):
* Source/JavaScriptCore/wasm/js/WebAssemblyBuiltin.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyCompileOptions.cpp:
(JSC::WebAssemblyCompileOptions::validateImportForBuiltinSetNames const):
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::WebAssemblyFunction):
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunctionBase.cpp:
(JSC::WebAssemblyFunctionBase::signature const):
* Source/JavaScriptCore/wasm/js/WebAssemblyFunctionBase.h:
(JSC::WebAssemblyFunctionBase::type const):
(JSC::WebAssemblyFunctionBase::typeIndex const): Deleted.
* Source/JavaScriptCore/wasm/js/WebAssemblyGCStructure.cpp:
(JSC::WebAssemblyGCStructure::WebAssemblyGCStructure):
(JSC::WebAssemblyGCStructure::create):
* Source/JavaScriptCore/wasm/js/WebAssemblyGCStructure.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::createTypeReflectionObject):
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::initializeBuiltinImport):
(JSC::WebAssemblyModuleRecord::initializeImports):
(JSC::WebAssemblyModuleRecord::initializeExports):
* Source/JavaScriptCore/wasm/js/WebAssemblyTagConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.cpp:
(JSC::WebAssemblyWrapperFunction::create):
* Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.h:

Canonical link: https://commits.webkit.org/312465@main
https://bugs.webkit.org/show_bug.cgi?id=313793
rdar://175988080

Reviewed by Marcus Plutowski and Mark Lam.

Making libpas Windows TLS mechanism simpler by using static TLS destructor,
which is well-known old technique. We register a function via segment
annotation. This function will be called when thread dies. And we just
read TLS pointer, mark it as destroying, and destroying it when it is
not nullptr and it is not a marker. This removes stub of
pthread_key_create etc. completely. Also destructor will be called
automatically when libpas is loaded, while we do not need to register it
explicitly at runtime.

* Source/bmalloc/libpas/src/libpas/pas_fast_tls.h:
* Source/bmalloc/libpas/src/libpas/pas_thread.c:
(pthread_key_create): Deleted.
(pthread_getspecific): Deleted.
(pthread_setspecific): Deleted.
* Source/bmalloc/libpas/src/libpas/pas_thread.h:
* Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c:
(pas_tls_on_thread_exit):

Canonical link: https://commits.webkit.org/312466@main
…en restoring from BFCache

https://bugs.webkit.org/show_bug.cgi?id=313760
rdar://175954055

Reviewed by Ryosuke Niwa.

When ProvisionalPageProxy is created from a suspended page (BFCache
restore), skip the Site Isolation remote page infrastructure setup in
initializeWebPage. The suspended page's WebProcess already has the
correct WebPage — setting up remote page parameters or taking an
existing RemotePageProxy is unnecessary and incorrect for this path.

Add a bool isRestoringFromBFCache parameter to initializeWebPage,
set from the presence of a suspendedPage in the constructor.

No new tests (no behavior change, multi-process BFCache feature flag is OFF by default).

* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::initializeWebPage):
* Source/WebKit/UIProcess/ProvisionalPageProxy.h:

Canonical link: https://commits.webkit.org/312467@main
https://bugs.webkit.org/show_bug.cgi?id=313855
rdar://176055472

Reviewed by Sihui Liu.

We can remove some redundant file read accesses, since these are being explicitly denied further
down in the sandbox.

* Source/WebKit/Shared/Sandbox/iOS/gpu-defines.sb:
* Source/WebKit/Shared/Sandbox/iOS/webcontent-defines.sb:

Canonical link: https://commits.webkit.org/312468@main
…via click

https://bugs.webkit.org/show_bug.cgi?id=313861
rdar://175290015

Reviewed by Abrar Rahman Protyasha.

In `WKTextSelectionController`, the `if !hasSelection || !editorState.hasPostLayoutAndVisualData()` predicate
was evaluating to `true` because the editor state had no post-layout data. As a result, the system didn't try
to invoke a context menu.

This issue was happening only in Safari, and only in non-contenteditable regions, and only when there
is no prior user interaction, because:

1. In non-Safari clients, `m_requiresUserActionForEditingControlsManager` is set to `false`, meaning that
`WebPage::shouldAvoidComputingPostLayoutDataForEditorState` always returns `false` and therefore the editor
state is always updated. This is not true for Safari.

2. In contenteditable regions, there is a focused element, and so `m_userInteractionsSincePageTransition.add(UserInteractionFlag::FocusedElement);`
gets invoked, and `WebPage::shouldAvoidComputingPostLayoutDataForEditorState` once again returns false.

Therefore, in order for a non-contenteditable region in Safari to have its editor state updated, a user interaction
must happen. This was not happening in most of the cases in WKTextSelectionController, since several WebPage
functions like `WebPage::updateSelectionWithExtentPointAndBoundary` did not properly attribute user interaction.

Fix by updating the relevant methods to add a missing

```
SetForScope userIsInteractingChange { m_userIsInteracting, true };
```

Tests: Tools/TestWebKitAPI/Helpers/cocoa/Foundation+Extras.swift
       Tools/TestWebKitAPI/Helpers/cocoa/JavaScriptMessages.swift
       Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKitGesturesTests.swift
       Tools/TestWebKitAPI/Tests/WebKit/WebPage/JavaScriptExpressionTests.swift

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(dictionaryRepresentationForEditorState):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration+Extras.swift:
* Source/WebKit/UIProcess/API/Swift/WebPage+Configuration.swift:
(Configuration.requiresUserActionForEditingControlsManager):
* Source/WebKit/UIProcess/API/Swift/WebPage.swift:
(editorStateSnapshotsContinuations):
(KeyValueObservations.contents):
(addEditorStateUpdate(_:)):
(editorStateSnapshots):
(WebPage.terminateWebContentProcess): Deleted.
* Source/WebKit/UIProcess/Cocoa/WKUIDelegateAdapter.swift:
(WKUIDelegateAdapter._webView(_:editorStateDidChange:)):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
* Tools/TestWebKitAPI/Helpers/cocoa/Foundation+Extras.swift:
(CGRect.center):
(State.signal):
(State.wait):
* Tools/TestWebKitAPI/Helpers/cocoa/JavaScriptMessages.swift:
(BoundingClientRect.expression):
(BoundingClientRect.encoded):
(SelectionBoundingClientRect.expression): Deleted.
(SelectionBoundingClientRect.encoded): Deleted.
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKitGesturesTests.swift:
(AppKitGesturesTests.updatingTextRangeSelectionByUserInteractionUpdatesEditorState(_:)):
(AppKitGesturesTests.clickingOnSelectedWordOpensContextMenu(_:)):
(AppKitGesturesTests.doubleClickingInWordSelectsWord(_:)):
(AppKitGesturesTests.clickingInWordChangesSelection(_:)):
(AppKitGesturesTests.clickingChangesSelection):
(convertToCoreGraphicsScreenCoordinates(_:window:)):
(AppKitGesturesTests.loadHTML(_:)):
(AppKitGesturesTests.screenBoundsOfText(_:)):
(AppKitGesturesTests.doubleClickingInWordSelectsWord): Deleted.
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/JavaScriptExpressionTests.swift:
(JavaScriptExpressionTests.selectionBoundingClientRectReturnsNonEmptyRectForRangeSelection):
(JavaScriptExpressionTests.selectionBoundingClientRectReturnsZeroWidthRectForCollapsedSelection):

Canonical link: https://commits.webkit.org/312469@main
https://bugs.webkit.org/show_bug.cgi?id=313799
rdar://175995348

Reviewed by Jer Noble.

Saves 12 CPU minutes / 1 wall clock minute in a clean build.

Moved lightweight inline functions out of heavy headers and
into light headers.

Added JSDOMBindingFacade.h to out-of-line JSC APIs that
require heavy headers for inlining.

* Source/JavaScriptCore/bytecode/SpeculatedType.h:
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
* Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:
* Source/JavaScriptCore/dfg/DFGUseKind.h:
* Source/JavaScriptCore/domjit/DOMJITGetterSetter.h:
* Source/JavaScriptCore/domjit/DOMJITSignature.h:
* Source/JavaScriptCore/heap/Heap.cpp:
(JSC::Heap::Heap):
* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/heap/Strong.h:
(JSC::REFTRACKER_DECL): Deleted.
* Source/JavaScriptCore/interpreter/CallFrameInlines.h:
(JSC::CallFrame::deprecatedVM const):
* Source/JavaScriptCore/interpreter/Interpreter.h:
* Source/JavaScriptCore/llint/LLIntData.cpp:
(JSC::LLInt::initialize):
* Source/JavaScriptCore/runtime/CommonSlowPaths.h:
* Source/JavaScriptCore/runtime/GenericTypedArrayView.h:
(JSC::GenericTypedArrayView<Adaptor>::GenericTypedArrayView):
(JSC::GenericTypedArrayView<Adaptor>::tryCreate):
* Source/JavaScriptCore/runtime/GenericTypedArrayViewInlines.h:
(JSC::GenericTypedArrayView<Adaptor>::GenericTypedArrayView): Deleted.
(): Deleted.
* Source/JavaScriptCore/runtime/IndexingType.cpp:
* Source/JavaScriptCore/runtime/IndexingType.h:
* Source/JavaScriptCore/runtime/JSCConfig.h:
* Source/JavaScriptCore/runtime/JSCInlines.h:
* Source/JavaScriptCore/runtime/JSCJSValuePropertyInlines.h:
* Source/JavaScriptCore/runtime/JSCellInlines.h:
(JSC::CallFrame::deprecatedVM const): Deleted.
* Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView<Adaptor>::possiblySharedTypedImpl):
(JSC::JSGenericTypedArrayView<Adaptor>::unsharedTypedImpl):
(JSC::toPossiblySharedNativeTypedView):
(JSC::toUnsharedNativeTypedView):
(JSC::JSGenericTypedArrayView<Adaptor>::toWrapped):
(JSC::JSGenericTypedArrayView<Adaptor>::toWrappedAllowResizable):
(JSC::JSGenericTypedArrayView<Adaptor>::toWrappedAllowShared):
(JSC::JSGenericTypedArrayView<Adaptor>::toWrappedAllowSharedAndResizable):
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::possiblySharedTypedImpl): Deleted.
(JSC::JSGenericTypedArrayView<Adaptor>::unsharedTypedImpl): Deleted.
(JSC::toPossiblySharedNativeTypedView): Deleted.
(JSC::toUnsharedNativeTypedView): Deleted.
(JSC::JSGenericTypedArrayView<Adaptor>::toWrapped): Deleted.
(JSC::JSGenericTypedArrayView<Adaptor>::toWrappedAllowResizable): Deleted.
(JSC::JSGenericTypedArrayView<Adaptor>::toWrappedAllowShared): Deleted.
(JSC::JSGenericTypedArrayView<Adaptor>::toWrappedAllowSharedAndResizable): Deleted.
* Source/JavaScriptCore/runtime/JSStringInlines.h:
* Source/JavaScriptCore/runtime/Options.h:
* Source/JavaScriptCore/tools/JSDollarVM.cpp:
(JSC::REFTRACKER_IMPL):
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp:
* Source/WTF/wtf/RefTrackerMixin.h:
* Source/WebCore/Configurations/Base.xcconfig:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/animation/KeyframeEffect.cpp:
* Source/WebCore/bindings/IDLTypes.h:
* Source/WebCore/bindings/js/JSCustomElementInterface.cpp:
* Source/WebCore/bindings/js/JSDOMAsyncIterator.h:
(WebCore::IteratorTraits>::runNextSteps):
(WebCore::IteratorTraits>::fulfill):
(WebCore::IteratorTraits>::runReturnSteps):
* Source/WebCore/bindings/js/JSDOMBindingFacade.cpp: Added.
(WebCore::putDirect):
(WebCore::iteratorMethod):
(WebCore::createIteratorResultObject):
(WebCore::getCallData):
(WebCore::getConstructData):
(WebCore::isIteratorProtocolFastAndNonObservable):
(WebCore::constructArray):
(WebCore::tryGetFastIterableJSArray):
(WebCore::forEachInContiguousJSArray):
(WebCore::forEachInIterable):
(WebCore::freezeObject):
* Source/WebCore/bindings/js/JSDOMBindingFacade.h: Added.
* Source/WebCore/bindings/js/JSDOMBuiltinConstructor.h:
(WebCore::JSDOMBuiltinConstructor<JSClass>::createStructure):
* Source/WebCore/bindings/js/JSDOMConstructor.h:
(WebCore::JSDOMConstructor<JSClass>::createStructure):
* Source/WebCore/bindings/js/JSDOMConstructorNotCallable.h:
(WebCore::JSDOMConstructorNotCallable<JSClass>::createStructure):
* Source/WebCore/bindings/js/JSDOMConstructorNotConstructable.h:
(WebCore::JSDOMConstructorNotConstructable<JSClass>::createStructure):
* Source/WebCore/bindings/js/JSDOMConvertBufferSource.h:
* Source/WebCore/bindings/js/JSDOMConvertInterface.h:
(WebCore::VariadicConverter<IDLInterface<T>>::convert):
* Source/WebCore/bindings/js/JSDOMConvertNumbers.h:
* Source/WebCore/bindings/js/JSDOMConvertSequences.h:
(WebCore::Detail::GenericSequenceConverter::convert):
(WebCore::Detail::NumericSequenceConverterImpl::convert):
(WebCore::Detail::SequenceConverterImpl::convertArray):
(WebCore::Detail::SequenceConverterImpl::convert):
* Source/WebCore/bindings/js/JSDOMConvertUnion.h:
* Source/WebCore/bindings/js/JSDOMConvertWebGL.h:
* Source/WebCore/bindings/js/JSDOMGlobalObjectInlines.h:
(WebCore::JSDOMGlobalObject::createStructure):
* Source/WebCore/bindings/js/JSDOMIterator.h:
(WebCore::jsPair):
(WebCore::iteratorForEach):
(WebCore::IteratorTraits>::next):
* Source/WebCore/bindings/js/JSDOMLegacyFactoryFunction.h:
(WebCore::JSDOMLegacyFactoryFunction<JSClass>::createStructure):
* Source/WebCore/bindings/js/JSDOMMapLike.cpp:
* Source/WebCore/bindings/js/JSDOMWindowBase.h:
* Source/WebCore/bindings/js/JSDOMWrapper.cpp:
(WebCore::JSDOMObject::finishCreation):
* Source/WebCore/bindings/js/JSDOMWrapper.h:
* Source/WebCore/bindings/js/JSDOMWrapperCache.h:
* Source/WebCore/bindings/js/JSErrorHandler.cpp:
* Source/WebCore/bindings/js/JSEventListener.cpp:
* Source/WebCore/bindings/js/JSIDBRequestCustom.cpp:
* Source/WebCore/bindings/js/JSIDBSerializationGlobalObject.cpp:
(WebCore::JSIDBSerializationGlobalObject::create):
* Source/WebCore/bindings/js/JSWindowProxy.cpp:
(WebCore::JSWindowProxy::create):
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateEnumerationImplementationContent):
(GenerateDictionaryImplementationContent):
(GenerateHeader):
(GenerateOverloadDispatcher):
(GenerateImplementation):
(GenerateCallbackImplementationContent):
(GenerateGenericIterableDefinition):
* Source/WebCore/bindings/scripts/preprocess-idls.pl:
* Source/WebCore/bindings/scripts/test/JS/JSDOMWindow.cpp:
(WebCore::JSDOMWindowPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSDOMWindow.h:
* Source/WebCore/bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.cpp:
(WebCore::JSDedicatedWorkerGlobalScopePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSDedicatedWorkerGlobalScope.h:
* Source/WebCore/bindings/scripts/test/JS/JSExposedStar.cpp:
(WebCore::JSExposedStarPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp:
(WebCore::JSExposedToWorkerAndWindowPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSPaintWorkletGlobalScope.cpp:
(WebCore::JSPaintWorkletGlobalScopePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSPaintWorkletGlobalScope.h:
* Source/WebCore/bindings/scripts/test/JS/JSServiceWorkerGlobalScope.cpp:
(WebCore::JSServiceWorkerGlobalScopePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSServiceWorkerGlobalScope.h:
* Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSShadowRealmGlobalScope.h:
* Source/WebCore/bindings/scripts/test/JS/JSSharedWorkerGlobalScope.cpp:
(WebCore::JSSharedWorkerGlobalScopePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSSharedWorkerGlobalScope.h:
* Source/WebCore/bindings/scripts/test/JS/JSTestAsyncIterable.cpp:
(WebCore::JSTestAsyncIterablePrototype::createStructure):
(WebCore::jsTestAsyncIterablePrototypeFunction_valuesCaller):
* Source/WebCore/bindings/scripts/test/JS/JSTestAsyncIterableWithoutFlags.cpp:
(WebCore::JSTestAsyncIterableWithoutFlagsPrototype::createStructure):
(WebCore::jsTestAsyncIterableWithoutFlagsPrototypeFunction_valuesCaller):
* Source/WebCore/bindings/scripts/test/JS/JSTestAsyncKeyValueIterable.cpp:
(WebCore::JSTestAsyncKeyValueIterablePrototype::createStructure):
(WebCore::jsTestAsyncKeyValueIterablePrototypeFunction_entriesCaller):
* Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp:
(WebCore::JSTestCEReactionsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
(WebCore::JSTestCEReactionsStringifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallTracer.cpp:
(WebCore::JSTestCallTracerPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionGenerateIsReachable.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunctionWithVariadic.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestCallbackWithFunctionOrDict.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::JSTestClassWithJSBuiltinConstructorPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestConditional.cpp:
(WebCore::JSTestConditionalPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestConditionalIncludes.cpp:
(WebCore::JSTestConditionalIncludesPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestConditionallyReadWrite.cpp:
(WebCore::JSTestConditionallyReadWritePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::JSTestDOMJITPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.h:
* Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSON.cpp:
(WebCore::JSTestDefaultToJSONPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONEnum.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp:
(WebCore::JSTestDefaultToJSONFilteredByExposedPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONIndirectInheritance.cpp:
(WebCore::JSTestDefaultToJSONIndirectInheritancePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInherit.cpp:
(WebCore::JSTestDefaultToJSONInheritPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInheritFinal.cpp:
(WebCore::JSTestDefaultToJSONInheritFinalPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestDelegateToSharedSyntheticAttribute.cpp:
(WebCore::JSTestDelegateToSharedSyntheticAttributePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryNoToNative.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestDomainSecurity.cpp:
(WebCore::JSTestDomainSecurityPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestEmbedderArrayLike.cpp:
(WebCore::JSTestEmbedderArrayLikePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestEmptyDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
(WebCore::JSTestEnabledBySettingPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
(WebCore::JSTestEnabledForContextPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestGenerateAddOpaqueRoot.cpp:
(WebCore::JSTestGenerateAddOpaqueRootPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachablePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::JSTestGlobalObjectPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h:
* Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
(WebCore::JSTestIndexedSetterNoIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
(WebCore::JSTestIndexedSetterThrowingExceptionPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
(WebCore::JSTestIndexedSetterWithIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary2.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfacePrototype::createStructure):
(WebCore::jsTestInterfacePrototypeFunction_entriesCaller):
* Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
(WebCore::JSTestInterfaceLeadingUnderscorePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp:
(WebCore::JSTestIterablePrototype::createStructure):
(WebCore::jsTestIterablePrototypeFunction_entriesCaller):
* Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::JSTestJSBuiltinConstructorPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp:
(WebCore::JSTestLegacyFactoryFunctionPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.cpp:
(WebCore::JSTestLegacyNoInterfaceObjectPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestLegacyOverrideBuiltIns.cpp:
(WebCore::JSTestLegacyOverrideBuiltInsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestMapLike.cpp:
(WebCore::JSTestMapLikePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestMapLikeWithOverriddenOperations.cpp:
(WebCore::JSTestMapLikeWithOverriddenOperationsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
(WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
(WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
(WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
(WebCore::JSTestNamedDeleterNoIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
(WebCore::JSTestNamedDeleterThrowingExceptionPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
(WebCore::JSTestNamedDeleterWithIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
(WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
(WebCore::JSTestNamedGetterCallWithPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
(WebCore::JSTestNamedGetterNoIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
(WebCore::JSTestNamedGetterWithIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
(WebCore::JSTestNamedSetterNoIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
(WebCore::JSTestNamedSetterThrowingExceptionPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
(WebCore::JSTestNamedSetterWithIdentifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
(WebCore::JSTestNamedSetterWithIndexedGetterPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
(WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyOverrideBuiltIns.cpp:
(WebCore::JSTestNamedSetterWithLegacyOverrideBuiltInsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp:
(WebCore::JSTestNamedSetterWithLegacyUnforgeablePropertiesPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltIns.cpp:
(WebCore::JSTestNamedSetterWithLegacyUnforgeablePropertiesAndLegacyOverrideBuiltInsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestNamespaceConst.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestNamespaceObject.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodePrototype::createStructure):
(WebCore::jsTestNodePrototypeFunction_entriesCaller):
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestOperationConditional.cpp:
(WebCore::JSTestOperationConditionalPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
(WebCore::JSTestOverloadedConstructorsWithSequencePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.cpp:
(WebCore::JSTestPluginInterfacePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
(WebCore::JSTestPromiseRejectionEventPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestReadOnlyMapLike.cpp:
(WebCore::JSTestReadOnlyMapLikePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestReadOnlySetLike.cpp:
(WebCore::JSTestReadOnlySetLikePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestReportExtraMemoryCost.cpp:
(WebCore::JSTestReportExtraMemoryCostPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestScheduledAction.cpp:
(WebCore::JSTestScheduledActionPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestSetLike.cpp:
(WebCore::JSTestSetLikePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestSetLikeWithOverriddenOperations.cpp:
(WebCore::JSTestSetLikeWithOverriddenOperationsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestStringifier.cpp:
(WebCore::JSTestStringifierPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
(WebCore::JSTestStringifierAnonymousOperationPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
(WebCore::JSTestStringifierNamedOperationPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
(WebCore::JSTestStringifierOperationImplementedAsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
(WebCore::JSTestStringifierOperationNamedToStringPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
(WebCore::JSTestStringifierReadOnlyAttributePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
(WebCore::JSTestStringifierReadWriteAttributePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestTaggedWrapper.cpp:
(WebCore::JSTestTaggedWrapperPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsPrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSWorkerGlobalScope.cpp:
(WebCore::JSWorkerGlobalScopePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSWorkerGlobalScope.h:
* Source/WebCore/bindings/scripts/test/JS/JSWorkletGlobalScope.cpp:
(WebCore::JSWorkletGlobalScopePrototype::createStructure):
* Source/WebCore/bindings/scripts/test/JS/JSWorkletGlobalScope.h:
* Source/WebCore/dom/make_event_factory.pl:
(generateImplementation):
* Source/WebCore/domjit/DOMJITCheckDOM.h:
* Source/WebCore/domjit/JSDocumentDOMJIT.cpp:
* Source/WebCore/domjit/JSNodeDOMJIT.cpp:
* Source/WebCore/fileapi/Blob.cpp:
* Source/WebCore/testing/Internals.h:
* Source/cmake/WebKitCompilerFlags.cmake:

Canonical link: https://commits.webkit.org/312470@main
https://bugs.webkit.org/show_bug.cgi?id=312901
rdar://175256026

Reviewed by Mike Wyrzykowski.

Moving PlatformXRCompositor and supporting files out of WebKitAdditions.

* Source/WTF/wtf/PlatformHave.h:
* Source/WTF/wtf/PlatformUse.h:
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/PlatformMac.cmake:
* Source/WebCore/PAL/pal/cocoa/ARKitSoftLink.h: Added.
* Source/WebCore/PAL/pal/cocoa/ARKitSoftLink.mm: Added.
* Source/WebCore/PAL/pal/cocoa/CompositorServicesSoftLink.h: Added.
* Source/WebCore/PAL/pal/cocoa/CompositorServicesSoftLink.mm: Added.
* Source/WebCore/PAL/pal/spi/cocoa/ARKitSPI.h:
* Source/WebCore/PAL/pal/spi/cocoa/CompositorServicesSPI.h: Copied from Source/WebCore/PAL/pal/spi/cocoa/ARKitSPI.h.
* Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h:
* Source/WebCore/platform/graphics/cocoa/TransformationMatrixCocoa.cpp:
(WebCore::TransformationMatrix::makeLookAt):
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
* Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp:
* Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm:
* Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.mm:
(-[_WKARPresentationSession raycastQueryTransformFromPoint:]):
* Source/WebKit/UIProcess/XR/xros/PlatformXRCompositor.h: Added.
* Source/WebKit/UIProcess/XR/xros/PlatformXRCompositor.mm: Added.
(makeMachSendRight):
(sizeFromLayerProperties):
(WebKit::CompositorCoordinator::isCompositorServicesAvailable):
(WebKit::CompositorCoordinator::CompositorCoordinator):
(WebKit::CompositorCoordinator::getPrimaryDeviceInfo):
(WebKit::CompositorCoordinator::filterOutUnsupportedFeatures const):
(WebKit::CompositorCoordinator::requestPermissionOnSessionFeatures):
(WebKit::CompositorCoordinator::startSession):
(WebKit::CompositorCoordinator::endSessionIfExists):
(WebKit::CompositorCoordinator::scheduleAnimationFrame):
(WebKit::CompositorCoordinator::submitFrame):
(WebKit::CompositorCoordinator::setPaused):
(WebKit::CompositorCoordinator::setBackgrounded):
(WebKit::CompositorCoordinator::updateVisibilityStateIfNeeded):
(WebKit::CompositorCoordinator::processEvent):
(WebKit::CompositorCoordinator::update):
(WebKit::convertToIntRect):
(WebKit::convertToLayerSetupSize):
(WebKit::CompositorCoordinator::render):
(WebKit::CompositorCoordinator::terminateSession):
(WebKit::CompositorCoordinator::currentSessionHasEnded):
(WebKit::CompositorCoordinator::didCompleteSessionSetup):
(WebKit::CompositorCoordinator::setUpDepthTextures):
(WebKit::CompositorCoordinator::sessionRequestIsCancelled):
(WebKit::CompositorCoordinator::getSupportedFeatures):
(WebKit::CompositorCoordinator::indexOfReusableTextures):
(WebKit::CompositorCoordinator::setUpVisibilityPropagationViews):
(WebKit::CompositorCoordinator::cleanUpVisibilityPropagationViewsIfNeeded):
* Source/WebKit/UIProcess/XR/xros/PlatformXRSystemXROS.mm: Renamed from Source/WebKit/Shared/Cocoa/ARKitSoftLink.mm.
(WebKit::PlatformXRSystem::xrCoordinator):
* Source/WebKit/UIProcess/XR/xros/WKSpatialGestureRecognizer.h: Copied from Source/WebCore/PAL/pal/spi/cocoa/ARKitSPI.h.
* Source/WebKit/UIProcess/XR/xros/WKSpatialGestureRecognizer.mm: Added.
(-[UITouch selectionRayTransformInLayer:]):
(-[UITouch poseTransformInLayer:]):
(-[WKSpatialGestureRecognizer touchesBegan:withEvent:]):
(-[WKSpatialGestureRecognizer touchesMoved:withEvent:]):
(-[WKSpatialGestureRecognizer touchesEnded:withEvent:]):
(-[WKSpatialGestureRecognizer touchesCancelled:withEvent:]):
* Source/WebKit/UIProcess/XR/xros/WKXRControllerManager.h: Copied from Source/WebKit/Shared/Cocoa/ARKitSoftLink.h.
* Source/WebKit/UIProcess/XR/xros/WKXRControllerManager.mm: Added.
(-[WKXRControllerManager init]):
(-[WKXRControllerManager dealloc]):
(-[WKXRControllerManager _notificationControllerDidConnect:]):
(-[WKXRControllerManager _notificationControllerDidDisconnect:]):
(-[WKXRControllerManager _controllerDidConnect:]):
(-[WKXRControllerManager _initInputSourceButtonWithGCButtonInput:gcButtonInput:]):
(-[WKXRControllerManager _startMonitoringGamepads]):
(-[WKXRControllerManager _stopMonitoringGamepads]):
(-[WKXRControllerManager getButtonsState:]):
(-[WKXRControllerManager getAxesState:]):
* Source/WebKit/UIProcess/XR/xros/WKXRTrackingManager.h: Renamed from Source/WebKit/Shared/Cocoa/ARKitSoftLink.h.
* Source/WebKit/UIProcess/XR/xros/WKXRTrackingManager.mm: Added.
(-[_WKTransientAction initWithTargetRay:pose:]):
(-[WKXRTrackingManager initWithHandTrackingEnabled:layerRenderer:controllerManager:]):
(-[WKXRTrackingManager dealloc]):
(-[WKXRTrackingManager isValid]):
(-[WKXRTrackingManager latestFloorPose]):
(-[WKXRTrackingManager deviceAnchorAtTime:]):
(-[WKXRTrackingManager _startTracking]):
(-[WKXRTrackingManager _stateDidChangeForDataProviders]):
(-[WKXRTrackingManager _endTracking]):
(-[WKXRTrackingManager cpLayerForGestureRecognizer:]):
(-[WKXRTrackingManager gestureRecognizer:transientActionDidStart:targetRayTransform:poseTransform:]):
(-[WKXRTrackingManager gestureRecognizer:transientActionDidUpdate:poseTransform:]):
(-[WKXRTrackingManager gestureRecognizer:transientActionDidEnd:]):
(-[WKXRTrackingManager gestureRecognizer:transientActionDidCancel:]):
(-[WKXRTrackingManager _doneWithTransientActionWithIdentifier:]):
(-[WKXRTrackingManager _platformXRInputSourceFromTransientAction:actionIdentifier:]):
(-[WKXRTrackingManager collectInputSources]):
(-[WKXRTrackingManager _platformXRInputSourceFromHandAnchor:]):
(-[WKXRTrackingManager _platformXRInputSourceFromAccessoryAnchor:]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaPlayer.swift:
(WKSLinearMediaPlayer.maybeCreateSpatialOrImmersiveEntity):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/312471@main
- 226 upstream commits, 48 touching JSC/WTF/bmalloc
- Resolved include-style conflicts (quote form per fork convention)
- Wasm RTT refactor (103a40a) supersedes our WebKit#63906 cherry-pick;
  dropped now-dead WebAssemblyGCTypeDependencies
- libpas: upstream now carries pas_process_is_shutting_down() guard
…sitesToCallUs

CalleeGroup::updateCallsitesToCallUs() collects call-site addresses from
each caller's BBQCallee into a local vector, then later writes to those
addresses via repatchNearCall(). The RefPtr<BBQCallee> taken inside the
handleCallerIndex lambda goes out of scope before the repatch loop runs.

If the BBQCallee is weakly held (already retired by a prior OMG tier-up
and reported to VMs for destruction), a concurrent GC can drop the last
ref to it between collectCallsites() and repatchNearCall(). Wasm compiler
threads are not stopped by stopThePeriphery() and their stacks are not
conservatively scanned, so nothing keeps the callee alive.

On Windows the executable allocator VirtualFree(MEM_DECOMMIT)s pages whose
occupancy reaches zero when the callee's ExecutableMemoryHandle is
destroyed, so the subsequent repatchNearCall() faults. On Darwin/Linux the
libpas JIT heap never unmaps pages, so the same UAF silently writes into
dead (or reallocated) JIT memory.

This mirrors the existing keepAliveOSREntryCallees vector that protects
OMGOSREntryCallee in the same function for the same reason.
git auto-merged both our cherry-picked copy (from WebKit#63906) and upstream's
6b357f3 at adjacent locations; keep one.
Upstream 709e4e7 added the include to Parser.h (which is exported)
but did not export EagerIIFERegistry.h itself, so out-of-tree consumers
that include Parser.h fail to build.
@coderabbitai

coderabbitai Bot commented May 2, 2026

Copy link
Copy Markdown

Walkthrough

Updates CODEOWNERS, refines macOS CMake configure presets with explicit language-specific flags, and adds/adjusts extensive JavaScript tests (stress and Test262) across Temporal, AsyncDisposableStack/DisposableStack, Promise.allKeyed/allSettledKeyed, TypedArray zero-fill, and minor utility assertions, with corresponding expectations updates.

Changes

Build Preset Flags (CMake macOS)

Layer / File(s) Summary
Preset Variables
CMakePresets.json
Adds Release flags for C/C++/ObjC/ObjC++ in mac-release (-O3 -DNDEBUG -g).
Preset Variables
CMakePresets.json
Adds Debug ObjC/ObjC++ flags in mac-dev-debug (-g -O3).
Preset Variables
CMakePresets.json
Adds RelWithDebInfo flags for C/C++/ObjC/ObjC++ in mac-dev-relwithdebinfo (-O3 -g -DNDEBUG).

Repository Ownership Metadata

Layer / File(s) Summary
Ownership Rules
.github/CODEOWNERS
Assigns /Tools/TestWebKitAPI/Tests/WebKit to @rr-codes. Updates *.xcconfig owners to @emw-apple @rr-codes``. Adds *.modulemap owned by `@rr-codes`.

JavaScript Tests and Expectations

Layer / File(s) Summary
Stress Tests
JSTests/stress/*
Adds eager IIFE column-tracking test and a typed array zero-fill stress validating allocations, boundaries, BigInt types, errors, and allocator reuse.
Expectation Data
JSTests/test262/expectations.yaml
Updates/extends outcomes for Temporal Duration round/total variants, half-boundary files, Import Attributes, and related new/adjusted tests.
Core Additions: Async Resource Mgmt
JSTests/test262/test/built-ins/AsyncDisposableStack/**, .../DisposableStack/**
Introduces comprehensive AsyncDisposableStack/DisposableStack conformance: adopt/defer/use/disposeAsync/move/disposed semantics, error paths, ordering, return types, toStringTag, and idempotence.
Core Additions: Promise Keyed APIs
JSTests/test262/test/built-ins/Promise/allKeyed/**, .../allSettledKeyed/**
Adds keyed-collection tests covering input validation, inheritance vs own props, key order, symbol/non-enumerable handling, resolve not callable, rejections, and empty inputs.
Temporal: Argument Validation
JSTests/test262/test/built-ins/Temporal/**/argument-string-too-many-decimals.js
Adds rejection tests for >9 fractional digits across Instant/PlainDate/PlainTime/PlainDateTime/PlainMonthDay/PlainYearMonth APIs (compare/from/prototype methods).
Temporal: Calendar ID Validation
JSTests/test262/test/built-ins/Temporal/**/calendar-invalid-iso-string.js, .../argument-string-calendar-annotation.js
Extends invalid calendar-ID matrices; adds valid iso8601 annotation-only cases where applicable.
Temporal: Accessor Basics
JSTests/test262/test/built-ins/Temporal/**/prototype/*/basic.js
Adds basic property tests for Duration components (years…nanoseconds, sign) and PlainDate(Time)/PlainYearMonth accessors including calendarId, era, eraYear, and time fields.
Temporal: Operation Order & Options
JSTests/test262/test/built-ins/Temporal/**/order-of-operations.js
Refactors expected sequences into primitive-options prefix plus options reads; adds options === null TypeError checks asserting only pre-option field reads occur.
Temporal: Rounding Behavior
JSTests/test262/test/built-ins/Temporal/**/round/**, .../since/roundingmode-half-boundary.js, .../until/roundingmode-half-boundary.js
Adds half-boundary rounding coverage across units and objects; extends rounding-increment tests including relativeTo permutations.
Temporal: Defaulting with Non-Object Options
JSTests/test262/test/built-ins/Temporal/**/options-undefined.js, **/*/largestunit-undefined.js, **/*/smallestunit-undefined.js, **/*/roundingincrement-undefined.js
Adds cases where a function is passed as options, asserting defaults (largestUnit, smallestUnit, roundingIncrement, overflow) remain unchanged.
Temporal: Prototype Pollution Guards
JSTests/test262/test/built-ins/Temporal/**/string-shorthand-no-object-prototype-pollution.js
Adds tests ensuring string shorthand creates null-prototype options, avoiding Object.prototype getter interference (Instant/PlainTime/PlainDateTime/Duration).
Numbers
JSTests/test262/test/built-ins/Number/MAX_VALUE/value.js, .../MIN_VALUE/value.js
Adds value and behavior tests for Number.MIN_VALUE and Number.MAX_VALUE.
Minor Adjustments/Removals
JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/month/unsupported.js
Removes test asserting absence of PlainMonthDay.prototype.month.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/does-not-reinvoke-disposers-if-dispose-already-started.js`:
- Line 6: Update the test description string to reflect the concurrent
disposal-start scenario instead of implying the stack was already disposed;
locate the description field (the line containing "description: Does not
re-invoke disposal on resources after stack has already been disposed.") and
change it to something like "Does not re-invoke disposal on resources after
disposal has already started" so it accurately matches the test logic that
exercises concurrent disposal start.

In
`@JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/Symbol.asyncDispose-method-not-async.js`:
- Line 6: The test metadata description incorrectly references
[Symbol.disposeAsync]; update the description string to mention
[Symbol.asyncDispose] so it matches the test intent and filename
(Symbol.asyncDispose-method-not-async.js) and the symbol used in the test body;
search for the description line in the test file and replace
"Symbol.disposeAsync" with "Symbol.asyncDispose" to keep metadata consistent
with the test and spec traceability.

In
`@JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-value-Symbol.dispose-property-not-callable.js`:
- Line 6: Update the test description to reference Symbol.dispose instead of
Symbol.asyncDispose: change the description string in the test (the line
starting with "description:") to state that it "Throws if the argument has a
non-null, non-undefined, non-callable Symbol.dispose property" so it matches the
test body which checks non-callable Symbol.dispose values; ensure any other
human-readable strings in this test that mention Symbol.asyncDispose are
similarly updated to Symbol.dispose (refer to the test file and the use of
Symbol.dispose in the body).

In
`@JSTests/test262/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js`:
- Around line 48-54: The checkTemporalObject helper only traps date-time fields
but not calendar, timeZone, or offset, so extend it to also define throwing
getters for "calendar", "timeZone", and "offset"; inside the function
checkTemporalObject add these property names to the list (or call
Object.defineProperty for each) so that accessing object.calendar,
object.timeZone, or object.offset will throw a Test262Error just like the other
fields.

In `@JSTests/test262/test/built-ins/Temporal/Duration/prototype/sign/basic.js`:
- Around line 10-20: Add a zero-duration test case to assert that the sign
getter returns 0 for a duration with all zero fields: create a new
Temporal.Duration where all units are zero (similar to instance/smallInstance
variables) and call assert.sameValue(zeroInstance.sign, 0); place it alongside
the existing checks (after smallInstance or smallNegInstance) to complete
coverage for Temporal.Duration.prototype.sign.

In `@JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/era/basic.js`:
- Line 5: The metadata esid string has a typo
"sec-temporal.plaindatet.prototype.era"; update it to the correct identifier
"sec-temporal.plaindate.prototype.era" so the test metadata matches the spec
section (locate the esid line in the test file and replace "plaindatet" with
"plaindate").
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 920cc97c-325b-4122-80ef-6dae1787eb9f

📥 Commits

Reviewing files that changed from the base of the PR and between 6ef83cb and 181881a.

📒 Files selected for processing (300)
  • .github/CODEOWNERS
  • CMakePresets.json
  • JSTests/stress/eager-iife-column-tracking.js
  • JSTests/stress/new-typed-array-constant-size-zero-fill.js
  • JSTests/test262/expectations.yaml
  • JSTests/test262/latest-changes-summary.txt
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/Symbol.toStringTag.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/adopt/adds-value-onDisposeAsync.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/adopt/allows-any-value.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/adopt/puts-value-onDisposeAsync-on-top-of-stack.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/adopt/returns-value.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/adopt/throws-if-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/adopt/throws-if-onDisposeAsync-not-callable.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/constructor.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/defer/adds-onDisposeAsync.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/defer/puts-onDisposeAsync-on-top-of-stack.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/defer/returns-undefined.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/defer/throws-if-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/defer/throws-if-onDisposeAsync-not-callable.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/Symbol.asyncDispose-method-not-async.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/disposes-resources-in-reverse-order.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/does-not-reinvoke-disposers-if-already-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/does-not-reinvoke-disposers-if-dispose-already-started.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/does-not-reject-if-already-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/explicit-await-for-null.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/explicit-await-for-undefined.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/explicit-await-skipped-when-empty.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/rejects-with-error-as-is-if-only-one-error-during-disposal.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/rejects-with-suppressederror-if-multiple-errors-during-disposal.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/resolves-to-undefined.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/returns-promise.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/sets-state-to-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposed/returns-false-when-not-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposed/returns-true-when-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/move/does-not-dispose-resources.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/move/returns-new-asyncdisposablestack-that-contains-moved-resources.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/move/returns-new-asyncdisposablestack-that-is-still-pending.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/move/returns-new-asyncdisposablestack.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/move/sets-state-to-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/move/still-returns-new-asyncdisposablestack-when-subclassed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/move/throws-if-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/Symbol.asyncDispose-getter.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/Symbol.dispose-getter.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/adds-async-disposable-value.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/adds-sync-disposable-value.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/allows-null-value.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/allows-undefined-value.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/gets-value-Symbol.asyncDispose-property-once.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/gets-value-Symbol.dispose-property-after-trying-Symbol.asyncDispose.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/gets-value-Symbol.dispose-property-once.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/puts-value-on-top-of-stack.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/returns-value.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-disposed.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-value-Symbol.asyncDispose-property-is-null-or-undefined.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-value-Symbol.asyncDispose-property-not-callable.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-value-Symbol.dispose-property-is-null-or-undefined.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-value-Symbol.dispose-property-not-callable.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-value-missing-Symbol.asyncDispose-and-Symbol.dispose.js
  • JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-value-not-object.js
  • JSTests/test262/test/built-ins/DisposableStack/prototype/adopt/throws-if-disposed.js
  • JSTests/test262/test/built-ins/DisposableStack/prototype/constructor.js
  • JSTests/test262/test/built-ins/DisposableStack/prototype/defer/throws-if-disposed.js
  • JSTests/test262/test/built-ins/Number/MAX_VALUE/value.js
  • JSTests/test262/test/built-ins/Number/MIN_VALUE/value.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/arg-is-function.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/arg-not-object-reject-bigint.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/arg-not-object-reject.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/ctx-non-ctor.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/key-order-preserved.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/non-enumerable-properties-ignored.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/prototype-keys-ignored.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/reject-deferred.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/reject-immed.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/resolve-not-callable-reject-with-typeerror.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/resolves-empty-object.js
  • JSTests/test262/test/built-ins/Promise/allKeyed/symbol-keys.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/arg-is-function.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/arg-not-object-reject-bigint.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/arg-not-object-reject.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/ctx-non-ctor.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/key-order-preserved.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/non-enumerable-properties-ignored.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/prototype-keys-ignored.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/resolve-not-callable-reject-with-typeerror.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/resolved-all-fulfilled.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/resolved-all-mixed.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/resolved-all-rejected.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/resolves-empty-object.js
  • JSTests/test262/test/built-ins/Promise/allSettledKeyed/symbol-keys.js
  • JSTests/test262/test/built-ins/Temporal/Duration/compare/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/Duration/compare/relativeto-argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/days/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/hours/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/microseconds/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/milliseconds/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/minutes/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/months/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/nanoseconds/nanoseconds.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/round/relativeto-argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/round/rounding-increment-relativeto.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/round/rounding-increments.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/round/string-shorthand-no-object-prototype-pollution.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/seconds/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/sign/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/toString/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/total/relativeto-argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/total/string-shorthand-no-object-prototype-pollution.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/weeks/basic.js
  • JSTests/test262/test/built-ins/Temporal/Duration/prototype/years/basic.js
  • JSTests/test262/test/built-ins/Temporal/Instant/compare/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/Instant/compare/no-fractional-minutes-hours.js
  • JSTests/test262/test/built-ins/Temporal/Instant/from/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/Instant/from/no-fractional-minutes-hours.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/equals/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/equals/no-fractional-minutes-hours.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/round/string-shorthand-no-object-prototype-pollution.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/since/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/since/largestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/since/no-fractional-minutes-hours.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/since/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/since/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/since/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/since/smallestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/toString/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/toString/timezone-string-datetime.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/toString/timezone-string-leap-second.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/toString/timezone-string-multiple-offsets.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/toString/timezone-string.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/until/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/until/largestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/until/no-fractional-minutes-hours.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/until/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/until/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/until/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/Instant/prototype/until/smallestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/compare/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/compare/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/from/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/from/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/from/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/from/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/add/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/add/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/calendarId/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/equals/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/equals/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/era/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/eraYear/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/since/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/since/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/since/largestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/since/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/since/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/since/roundingmode-half-boundary.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/since/smallestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/subtract/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/subtract/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/subtract/overflow-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/argument-object.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toPlainDateTime/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toString/calendarname-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/toZonedDateTime/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/until/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/until/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/until/largestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/until/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/until/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/until/roundingmode-half-boundary.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/until/smallestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/with/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/with/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/compare/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/compare/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/from/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/from/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/from/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/from/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/from/overflow-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/add/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/add/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/add/overflow-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/calendarId/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/equals/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/era/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/eraYear/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/hour/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/microsecond/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/millisecond/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/minute/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/nanosecond/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/round/string-shorthand-no-object-prototype-pollution.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/second/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/since/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/since/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/since/largestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/since/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/since/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/since/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/since/roundingmode-half-boundary.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/since/smallestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/subtract/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/subtract/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/subtract/overflow-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/toString/calendarname-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/until/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/until/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/until/largestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/until/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/until/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/until/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/until/roundingmode-half-boundary.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/until/smallestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/with/copy-properties-not-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/with/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/with/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/with/overflow-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainDateTime/prototype/withPlainTime/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/from/argument-string-calendar-annotation.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/from/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/from/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/from/iso-year-used-only-for-overflow.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/from/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/from/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/calendarId/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/equals/argument-string-calendar-annotation.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/equals/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/equals/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/month/unsupported.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/toString/calendarname-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/with/copy-properties-not-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/with/iso-year-used-only-for-overflow.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/with/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/with/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/compare/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/from/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/from/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/from/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/equals/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/hour/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/microsecond/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/millisecond/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/minute/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/nanosecond/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/round/string-shorthand-no-object-prototype-pollution.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/second/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/since/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/since/largestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/since/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/since/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/since/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/toString/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/until/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/until/largestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/until/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/until/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/until/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/with/copy-properties-not-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/with/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainTime/prototype/with/overflow-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/compare/argument-string-calendar-annotation.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/compare/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/compare/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/from/argument-string-calendar-annotation.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/from/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/from/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/from/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/from/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/add/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/calendarId/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/equals/argument-string-calendar-annotation.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/equals/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/equals/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/era/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/eraYear/basic.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/since/argument-string-calendar-annotation.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/since/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/since/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/since/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/since/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/since/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/since/roundingmode-half-boundary.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/since/smallestunit-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/subtract/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/toString/calendarname-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/until/argument-string-calendar-annotation.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/until/argument-string-calendar-invalid-iso-string.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/until/argument-string-too-many-decimals.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/until/options-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/until/order-of-operations.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/until/roundingincrement-undefined.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/until/roundingmode-half-boundary.js
  • JSTests/test262/test/built-ins/Temporal/PlainYearMonth/prototype/until/smallestunit-undefined.js
💤 Files with no reviewable changes (1)
  • JSTests/test262/test/built-ins/Temporal/PlainMonthDay/prototype/month/unsupported.js


/*---
esid: sec-asyncdisposablestack.prototype.disposeAsync
description: Does not re-invoke disposal on resources after stack has already been disposed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update description to match the actual “already started” scenario.
The current description says “already been disposed,” but this test specifically exercises concurrent disposal start.

Proposed fix
-description: Does not re-invoke disposal on resources after stack has already been disposed.
+description: Does not re-invoke disposal on resources after stack disposal has already started.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
description: Does not re-invoke disposal on resources after stack has already been disposed.
description: Does not re-invoke disposal on resources after stack disposal has already started.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/does-not-reinvoke-disposers-if-dispose-already-started.js`
at line 6, Update the test description string to reflect the concurrent
disposal-start scenario instead of implying the stack was already disposed;
locate the description field (the line containing "description: Does not
re-invoke disposal on resources after stack has already been disposed.") and
change it to something like "Does not re-invoke disposal on resources after
disposal has already started" so it accurately matches the test logic that
exercises concurrent disposal start.


/*---
esid: sec-asyncdisposablestack.prototype.disposeAsync
description: Disposal succeeds even if [Symbol.disposeAsync] does not return a Promise.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Correct the symbol name in metadata description.

Line 6 uses [Symbol.disposeAsync], but this test targets Symbol.asyncDispose. This metadata mismatch can mislead spec-traceability and readers.

Suggested patch
-description: Disposal succeeds even if [Symbol.disposeAsync] does not return a Promise.
+description: Disposal succeeds even if [Symbol.asyncDispose] does not return a Promise.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
description: Disposal succeeds even if [Symbol.disposeAsync] does not return a Promise.
description: Disposal succeeds even if [Symbol.asyncDispose] does not return a Promise.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/Symbol.asyncDispose-method-not-async.js`
at line 6, The test metadata description incorrectly references
[Symbol.disposeAsync]; update the description string to mention
[Symbol.asyncDispose] so it matches the test intent and filename
(Symbol.asyncDispose-method-not-async.js) and the symbol used in the test body;
search for the description line in the test file and replace
"Symbol.disposeAsync" with "Symbol.asyncDispose" to keep metadata consistent
with the test and spec traceability.


/*---
esid: sec-asyncdisposablestack.prototype.use
description: Throws if the argument has a non-null, non-undefined, non-callable Symbol.asyncDispose property.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix description: it should reference Symbol.dispose, not Symbol.asyncDispose.
This test body checks non-callable Symbol.dispose values.

Proposed fix
-description: Throws if the argument has a non-null, non-undefined, non-callable Symbol.asyncDispose property.
+description: Throws if the argument has a non-null, non-undefined, non-callable Symbol.dispose property.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@JSTests/test262/test/built-ins/AsyncDisposableStack/prototype/use/throws-if-value-Symbol.dispose-property-not-callable.js`
at line 6, Update the test description to reference Symbol.dispose instead of
Symbol.asyncDispose: change the description string in the test (the line
starting with "description:") to state that it "Throws if the argument has a
non-null, non-undefined, non-callable Symbol.dispose property" so it matches the
test body which checks non-callable Symbol.dispose values; ensure any other
human-readable strings in this test that mention Symbol.asyncDispose are
similarly updated to Symbol.dispose (refer to the test file and the use of
Symbol.dispose in the body).

Comment on lines +48 to +54
function checkTemporalObject(object) {
["year", "month", "monthCode", "day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond"].forEach((property) => {
Object.defineProperty(object, property, {
get() {
throw new Test262Error(`should not get ${property}`);
}});
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Harden fast-path guard by trapping calendar/timeZone/offset too.

checkTemporalObject currently throws for date-time fields but not calendar, timeZone, or offset; a regression that reads those on Temporal objects could slip through this test.

Proposed patch
 function checkTemporalObject(object) {
-  ["year", "month", "monthCode", "day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond"].forEach((property) => {
+  [
+    "year", "month", "monthCode", "day",
+    "hour", "minute", "second", "millisecond", "microsecond", "nanosecond",
+    "calendar", "timeZone", "offset"
+  ].forEach((property) => {
     Object.defineProperty(object, property, {
       get() {
         throw new Test262Error(`should not get ${property}`);
       }});
   });
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@JSTests/test262/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js`
around lines 48 - 54, The checkTemporalObject helper only traps date-time fields
but not calendar, timeZone, or offset, so extend it to also define throwing
getters for "calendar", "timeZone", and "offset"; inside the function
checkTemporalObject add these property names to the list (or call
Object.defineProperty for each) so that accessing object.calendar,
object.timeZone, or object.offset will throw a Test262Error just like the other
fields.

Comment on lines +10 to +20
const instance = new Temporal.Duration(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
assert.sameValue(instance.sign, 1);

const smallInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
assert.sameValue(smallInstance.sign, 1);

const negInstance = new Temporal.Duration(-1, -2, -3, -4, -5, -6, -7, -8, -9, -10);
assert.sameValue(negInstance.sign, -1);

const smallNegInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, -1);
assert.sameValue(smallNegInstance.sign, -1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Add a zero-duration assertion for sign === 0.

This test currently validates positive/negative paths only; adding a zero case completes baseline coverage for the getter.

Suggested patch
 const instance = new Temporal.Duration(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
 assert.sameValue(instance.sign, 1);

+const zeroInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+assert.sameValue(zeroInstance.sign, 0);
+
 const smallInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
 assert.sameValue(smallInstance.sign, 1);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const instance = new Temporal.Duration(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
assert.sameValue(instance.sign, 1);
const smallInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
assert.sameValue(smallInstance.sign, 1);
const negInstance = new Temporal.Duration(-1, -2, -3, -4, -5, -6, -7, -8, -9, -10);
assert.sameValue(negInstance.sign, -1);
const smallNegInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, -1);
assert.sameValue(smallNegInstance.sign, -1);
const instance = new Temporal.Duration(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
assert.sameValue(instance.sign, 1);
const zeroInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
assert.sameValue(zeroInstance.sign, 0);
const smallInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
assert.sameValue(smallInstance.sign, 1);
const negInstance = new Temporal.Duration(-1, -2, -3, -4, -5, -6, -7, -8, -9, -10);
assert.sameValue(negInstance.sign, -1);
const smallNegInstance = new Temporal.Duration(0, 0, 0, 0, 0, 0, 0, 0, 0, -1);
assert.sameValue(smallNegInstance.sign, -1);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@JSTests/test262/test/built-ins/Temporal/Duration/prototype/sign/basic.js`
around lines 10 - 20, Add a zero-duration test case to assert that the sign
getter returns 0 for a duration with all zero fields: create a new
Temporal.Duration where all units are zero (similar to instance/smallInstance
variables) and call assert.sameValue(zeroInstance.sign, 0); place it alongside
the existing checks (after smallInstance or smallNegInstance) to complete
coverage for Temporal.Duration.prototype.sign.

// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-temporal.plaindatet.prototype.era

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix esid typo in metadata.

Line 5 uses sec-temporal.plaindatet.prototype.era; this should be sec-temporal.plaindate.prototype.era.

Proposed fix
-esid: sec-temporal.plaindatet.prototype.era
+esid: sec-temporal.plaindate.prototype.era
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
esid: sec-temporal.plaindatet.prototype.era
esid: sec-temporal.plaindate.prototype.era
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@JSTests/test262/test/built-ins/Temporal/PlainDate/prototype/era/basic.js` at
line 5, The metadata esid string has a typo
"sec-temporal.plaindatet.prototype.era"; update it to the correct identifier
"sec-temporal.plaindate.prototype.era" so the test metadata matches the spec
section (locate the esid line in the test file and replace "plaindatet" with
"plaindate").

…OWN)

DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER expands to a
LazyNeverDestroyed<DebugHeap> in this configuration but the header was
relying on transitive/unified-source includes. Adding
parser/EagerIIFERegistry.cpp to Sources.txt upstream shifted the bundle
so SourceProviderCache.cpp is first in UnifiedSource-95324de6-2.cpp and
no longer gets it for free.
…che; defer T::CustomFunctionPointer

Two latent IWYU issues exposed by upstream's Sources.txt churn (added
parser/EagerIIFERegistry.cpp + wasm RTT refactor) shifting unified-source
bundling:

1. SourceProviderCache.cpp uses DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER under
   ENABLE(MALLOC_HEAP_BREAKDOWN) without including NeverDestroyed.h.
   (Reverted prior DebugHeap.h fix — that header is included by FastMalloc.h
   itself, so adding NeverDestroyed.h there is circular.)

2. JSGlobalObject::WeakCustomGetterOrSetterHash<T>::hash declares a
   typename T::CustomFunctionPointer parameter, forcing JSCustomGetterFunction
   /JSCustomSetterFunction to be complete whenever the hash trait is
   instantiated. Under -fforce-emit-vtables (LTO builds) that happens in TUs
   that only see the forward decls. Template the overload on U=T so the
   dependent lookup is deferred to call sites.
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

Preview Builds

Commit Release Date
a10fd987 autobuild-preview-pr-210-a10fd987 2026-05-02 07:34:20 UTC

@Jarred-Sumner
Jarred-Sumner merged commit 46c0b63 into main May 2, 2026
44 of 85 checks passed
Jarred-Sumner pushed a commit to oven-sh/bun that referenced this pull request Jul 1, 2026
Bumps `vendor/WebKit` to upstream `WebKit/WebKit@d81bcc3d833c`
(2026-06-30). 887 upstream commits since the last Bun sync point
(`b5ba38a21e17`, 2026-06-16); 117 touch `Source/JavaScriptCore`, 54
touch `Source/WTF`, 10 touch `Source/bmalloc`.

The fork-side work is split across two merge PRs:

- oven-sh/WebKit#261: `b5ba38a21e17` to `ce481c4cfedb`, merged as
`0d9ee56ba4f6`.
- oven-sh/WebKit#263: `ce481c4cfedb` to `d81bcc3d833c`, based on the
fork's current `main`, so it also carries oven-sh/WebKit#257 and
oven-sh/WebKit#262, which landed on the fork between the two merges and
which fix real Bun bugs (see below).

> [!NOTE]
> oven-sh/WebKit#263 has landed on `main` as `c9ad5813fd23`, and
`WEBKIT_VERSION` now points at that commit's release,
`autobuild-c9ad5813fd23bd8b98b0738abc3d037ec716aa92`. Nothing else is
pending on the WebKit side. It was landed as a squash rather than a
merge commit, but `c9ad5813fd23`'s git tree is byte-identical to the
preview head `f652829d78`'s tree (verified: both are `470eee60f5`), so
the final artifacts are built from exactly the source all of the
verification below ran against. The squash does drop the upstream parent
link, so whoever does the next fork upgrade will need a merge-base fixup
like the one that followed oven-sh/WebKit#251.

Fixes #32793

## Bun changes required by this upgrade

### From `b5ba38a2 -> ce481c4c`: three builtin rewrites

Upstream removed three bytecode intrinsics that Bun's built-in JS
modules use (https://bugs.webkit.org/show_bug.cgi?id=318076 and
https://bugs.webkit.org/show_bug.cgi?id=318028). Bumping the version
without these rewrites aborts on every `Buffer.from()` call:

```
ASSERTION FAILED: Private symbol not found: tryGetByIdWithWellKnownSymbol(value, "toPrimitive");
```

and on `new console.Console(stream).table(...)` (the global
`console.table` is native and was unaffected).

- `src/js/builtins/JSBufferConstructor.ts`:
`$tryGetByIdWithWellKnownSymbol(value, "toPrimitive")` becomes an
ordinary `value[Symbol.toPrimitive]` read, which is exactly what Node's
`lib/buffer.js` does. The removed intrinsic never invoked accessors, so
this is also a Node-compat improvement: a getter-defined
`Symbol.toPrimitive` is now honored.
`test/js/node/buffer-from-symbol-to-primitive.test.ts` covers it and
fails on the released Bun.
- `src/js/builtins/ConsoleObject.ts`: `$isMapIterator` /
`$isSetIterator` become `require("node:util/types").isMapIterator /
isSetIterator`, which is exactly what Node's
`internal/console/constructor.js` does.
`test/js/node/console/console-table-iterators.test.ts` is a snapshot
test that passes on both the released Bun and this branch, proving the
rewrite is behavior-preserving (there was no prior coverage for
`Console#table` on a Map/Set iterator).
- `src/js/builtins.d.ts`: the declarations for all ten removed
intrinsics are deleted so nothing reaches for them again.

### From oven-sh/WebKit#257: `jest` fake-time code must use the new
`NaN` sentinel

oven-sh/WebKit#257 changed the "no override is active" sentinel on
`JSGlobalObject::overridenDateNow` from `-1` to `NaN` (see
`JSGlobalObject::jsDateNow()`). Bun's reset paths still wrote `-1`,
which the new semantics read as a *live* override frozen at `-1` ms, so
`jest.useRealTimers()` and `setSystemTime()` with no argument left
`Date.now()` stuck at `1969-12-31T23:59:59.999Z`.
`test/js/bun/test/test-timers.test.ts` ("we can go back in time") caught
this against a Bun built from the #263 artifact.

- `src/runtime/test_runner/timers/FakeTimers.rs`: `CurrentTime::clear`
(the `jest.useRealTimers()` path) writes `f64::NAN` instead of `-1.0`.
- `src/jsc/bindings/JSMockFunction.cpp`, `JSMock__jsSetSystemTime`: the
reset value becomes `PNaN`. The old `>= 0` / `std::isnormal()` gating
existed only to serve the `-1` sentinel and silently dropped every
pre-epoch and zero override (a bug the #257 review called out); with the
`NaN` sentinel every real timestamp is a valid override, so
`setSystemTime(-1)` and `setSystemTime(new Date("1960-01-01"))` now
work. A new test in `test/js/bun/test/test-timers.test.ts` covers the
pre-epoch, zero, `-1`, and no-argument-reset cases and fails on Bun
1.4.0.
- Deleted `JSMock__jsUseRealTimers` from `JSMockFunction.cpp`: nothing
registers it (`jest.useRealTimers` is the Rust `use_real_timers` in
`FakeTimers.rs`), and it was the third place that would have needed the
sentinel change.

`ce481c4c -> d81bcc3d` itself (the 84 upstream commits) requires
nothing: no bytecode intrinsics changed, `JSType.h` did not change, and
the only WebCore code-generator change is to a helper Bun does not use.

## Bun bugs fixed by the fork-side commits this carries

- oven-sh/WebKit#257: `Date.now()` is tagged `DateNowIntrinsic`, so a
hot call site is inlined by the DFG/FTL as a `DateNow` node, and
`operationDateNow` returned the wall clock instead of reading
`JSGlobalObject::overridenDateNow`. A `setSystemTime()` override
therefore silently wore off as soon as a `Date.now()` call site tiered
up (#32793). `test/regression/issue/32793.test.ts` spawns the loop from
that issue and asserts the override never diverges; on the released Bun
it diverges at iteration 99, and it also fails against a build of this
branch's previous pin (`0d9ee56ba4f6`, which predates #257), so the test
isolates exactly this commit.
- oven-sh/WebKit#262: a top-level `import()` whose embedder fetch
rejects with a value that is not an `ErrorInstance` (a single-message
transpile failure rejects with a `BuildMessage`) poisoned its module
registry entry, and every later importer of the same file hung forever.
The Bun-side regression test lives in #33149, which also pins a WebKit
preview; once this lands, #33149 reduces to its test plus its
`scripts/sync-webkit-source.ts` improvement.

## Why the regression tests are spawned fixtures

Without the three builtin rewrites, a Bun built against this WebKit
aborts on the first `Buffer.from()` call:

```
ASSERTION FAILED: Private symbol not found: tryGetByIdWithWellKnownSymbol(value, "toPrimitive");
```

`Buffer.from` is fundamental enough that this takes down the `bun test`
runner itself, before any test file finishes loading and before the
JUnit reporter can write anything. So
`buffer-from-symbol-to-primitive.test.ts` and
`console-table-iterators.test.ts` live in two small files of their own
and spawn a child Bun instead of calling the affected APIs in process: a
child abort becomes an ordinary `exitCode`/`stdout` assertion failure,
whereas an in-process call takes the parent test runner down with it and
reports nothing. Their fail-before is "this branch minus the `src/js/`
rewrites", which is a deterministic SIGABRT:

```sh
git checkout $(git merge-base HEAD origin/main) -- src/js/   # keep scripts/ (the WEBKIT_VERSION bump)
bun bd test test/js/node/buffer-from-symbol-to-primitive.test.ts
# => ASSERTION FAILED: Private symbol not found: tryGetByIdWithWellKnownSymbol(...)  (SIGABRT)
git checkout HEAD -- src/js/
```

`test/js/bun/test/test-timers.test.ts` is the equivalent fail-before for
the sentinel change: with the `src/` diff reverted but the new WebKit
kept, both "we can go back in time" and the new `setSystemTime` test
fail.

`test/regression/issue/32793.test.ts` is different from all of the
above: its fix lives entirely in the vendored engine, selected by
`scripts/build/deps/webkit.ts` rather than by anything under `src/`. So
its before/after is a function of which WebKit artifact is linked, not
of the `src/` diff: it fails on the released Bun (1.4.0), fails against
this branch built with the previous pin `0d9ee56ba4f6`, and passes
against this branch built with the #263 artifact.

## Verification

All of the following were run against a debug Bun built from this branch
and the `autobuild-preview-pr-263-f652829d` artifact.

- The four test files this PR adds or modifies
(`test/js/bun/test/test-timers.test.ts`,
`test/regression/issue/32793.test.ts`,
`test/js/node/buffer-from-symbol-to-primitive.test.ts`,
`test/js/node/console/console-table-iterators.test.ts`): 5 tests, all
pass. Every one fails in the right "before" state as described above.
- Every test file in the repo that exercises `setSystemTime` /
`useFakeTimers` / `useRealTimers` / `advanceTimers*` (the blast radius
of the sentinel change):
`test/js/bun/test/fake-timers/fake-timers.test.ts`,
`test/js/bun/test/fake-timers/sinonjs/fake-timers.test.ts`,
`test/js/bun/cron/in-process-cron.test.ts`,
`test/regression/issue/25869.test.ts`,
`test/regression/issue/26284.test.ts`, and the five
`test/js/third_party/jsonwebtoken/*.test.js` suites. 249 pass, 1 todo, 0
fail.
- One more file turned out to be in that blast radius:
`test/js/bun/test/fake-timers/sinonjs/issue-207.test.ts`. The sentinel
change makes pre-epoch and negative clock values work, so its three
long-`.failing` tests ("should floor negative now values", "should floor
negative start times", "should handle ticks on the negative side of the
Epoch") started passing, which Bun's runner reports as a failure until
the stale marker is removed. `d2309c92c2` removes them; all ten tests in
the file pass against this branch.
- `test/js/node/buffer.test.js`: 539 pass, 1 pre-existing skip, 0 fail.
`test/js/node/console/console.test.ts`: 7 pass. Neither file is modified
by this PR.
- oven-sh/WebKit#263's preview build produced all 43 platform artifacts
with no job failures.

## Upstream changelog

<details>
<summary><code>ce481c4c</code> -> <code>d81bcc3d</code> (the new hop in
this revision)</summary>

Memory safety and security:

- `TypedArray.from()` out-of-bounds read via resizable `ArrayBuffer`
resize/transfer inside the `mapFn` callback
- Stale structure bit in `SlowPutArrayStorage`
- Do not cache property absence on dictionary structures
- Missing `codeBlock->m_lock` in `repatchGetBySlowPathCall`
- Insert a write barrier for `MultiPutByOffset` when it can reallocate
storage
- Unconditionally keep `OMGOSREntryCallee` alive while updating its
callsites
- Disallow defining private names on WasmGC objects
- Size limit on Yarr-generated code

Correctness:

- DFG spread did not account for `cellButterflyOnlyAtomStringsStructure`
- YarrJIT `negativeOffsetIndexedAddress` discarded the adjusted base
register
- `DFGArgumentsEliminationPhase::removeViaKill` did not reset the node
scan index between `InlineCallFrame`s

Other:

- An `ArrayStorage`-specific `GetByVal` DFG operation
- ES2022 private method support in the Web Inspector
- WTF: `TinyLRUCache::findIfCached` / `insert`

</details>

<details>
<summary>Security / correctness fixes (<code>b5ba38a2</code> ->
<code>ce481c4c</code>)</summary>

- Use-after-free after Wasm memory grow via a stale pointer folded by
DFGConstantFoldingPhase
- Keep `JSWebAssemblyMemory` alive from wasm-originated `JSArrayBuffer`s
(UAF)
- Use-after-free of `StreamingCompiler::m_ticket`
- `BBQCallee` kept alive between callsite collection and repatch
(upstreams and extends oven-sh/WebKit#210)
- `Array.from(arguments)` fast path bails out past
`MAX_STORAGE_VECTOR_LENGTH`
- `JSArray::fastFlat` bounds-checked against the maximum legal length
- `Array#flat` fast path was dropping prototype-backed holes in nested
arrays
- `Array.from(map.keys())` fast path was ignoring `Symbol.iterator`
overrides
- `RegExp#@@split` crash on a huge flags string
- `LiteralParser` takes the slow path if the original structure changes
- Missing exit-profile bails on some DFG nodes
- `IteratorClose` in `forEachInIterable` uses the Map/Set's own realm's
iterator structure
- YARR: JIT backreference with a non-BMP character was skipping the next
match start position
- Wasm Memory64: fix parsing of data segment init expressions
- Track `customSlotBase` for `CustomAccessorGetter` /
`CustomAccessorSetter`
- Set `MayStoreHole` appropriately; `"entries"` ArrayIterator emits
`ExitOK` before `NewArray`
- `poisonedDeadOSRExitValue` made crashier and on by default in debug
builds

</details>

<details>
<summary>Language features and spec alignment (<code>b5ba38a2</code> ->
<code>ce481c4c</code>)</summary>

- BigInt Math proposal implemented
- Temporal: spec-alignment passes across `PlainDate`, `PlainTime`,
`Duration`, `Instant`, plus a unified `ParseISODateTime`
- `Intl.PluralRules` reflects `compactDisplay` in its skeleton and
`resolvedOptions()`

</details>

<details>
<summary>Performance (<code>b5ba38a2</code> ->
<code>ce481c4c</code>)</summary>

JavaScript-visible fast paths:

- `JSON.stringify` space/indentation argument handled by
`FastStringifier`
- Fast path for the `RegExp#flags` getter; cached named-capture `groups`
Structure on `RegExp`
- Map/Set iterator `next` and `%RegExpStringIteratorPrototype%.next`
moved to C++
- int32 fast path in `parseInt` for short decimal strings
- `NumericStrings` int cache lookup inlined into DFG/FTL
`ToString(Int32)`
- `Object#isPrototypeOf` uses the `InstanceOf` DFG node
- `Object.freeze` / `seal` / `preventExtensions` no longer allocate
`ArrayStorage` for `NonArray` objects
- Map/Set `set` + `delete` churn no longer expands then immediately
shrinks
- Avoided an intermediate `StringImpl` allocation feeding
`StringBuilder` into `makeString`
- Wasm `intoCharCodeArray` bulk-copies 8-bit strings; unnecessary
watchpoints avoided
- `DFG::GetByVal` widens to `SpecBytecodeTop` instead of forcing an OSR
exit on an empty value profile

YARR (the RegExp engine):

- `latin1Table` for efficient Char8 filtering, reused for Char16 and the
interpreter
- `StringList` optimization when captures are unused; atom fast path
enabled for unicode patterns

JIT compile time (a large batch aimed at DFG/FTL/B3/Air throughput):

- Semi-NCA algorithm for `WTF::Dominators`; reverse post-order in
`WTF::Liveness` and B3 `ReduceStrength`; `SparseBitVector` in
`DFGLivenessAnalysis`
- Unified `SSACalculator`; dominance frontiers computed once per graph
- `AirFixObviousSpills`, `AirEliminateDeadCode`, `Air::RegLiveness`, and
the greedy register allocator all got cheaper
- B3 CSE reimplemented without `B3::Variable`; `B3::Value::effects` uses
a constant table
- `ReduceStrength` avoids fixed-point iteration; `InferSwitch` disabled
in B3 for Wasm
- Fixup-inserted `RegExp` primordial `TryGetById` chains replaced with a
single `CheckStructure`
- Parser: create save points only when actually needed
- Baseline/LLInt profile `op_unsigned` overflow and report int32
overflow to the DFG

</details>

<details>
<summary>WTF, bmalloc, and the build system (<code>b5ba38a2</code> ->
<code>ce481c4c</code>)</summary>

- `SaturatedArithmetic.h` and its APIs renamed to `Saturating` (Bun does
not use these directly)
- Checked arithmetic helpers now require two or more arguments
- `OrderedHashTable` load-factor policy aligned with `HashTable`
- `JSON::Value::dump` no longer corrupts large string values via
`PrintStream` truncation
- Structured clone: the remaining terminal JS value tags moved from
WebCore into JSC (`CloneSerializerBase.h` / `StructuredCloneTags.h`).
Bun keeps its own fork of `SerializedScriptValue.cpp`, so this is
additive.
- Workaround for a GCC 14+ false `-Wuninitialized` in `Variant`;
`[[msvc::no_unique_address]]` used on MSVC
- WTF / libpas exception codes changed to `0xbb08`
- libpas: per-heap tagging policy rework; `pas_deallocate` split into
inline-only and casual variants; PGO applied to WTF/bmalloc
- CMake: prefix headers expanded, headermap generation reworked, stale
staged headers pruned, and the Darwin platform block in `BPlatform.h` /
`pas_platform.h` no longer excludes CMake builds (restored in the fork,
see oven-sh/WebKit#261; without it the Linux-to-macOS cross lane fails
to link `gigacageEnabledForProcess`)

</details>
liooil pushed a commit to liooil/poly that referenced this pull request Aug 7, 2026
Bumps `vendor/WebKit` to upstream `WebKit/WebKit@d81bcc3d833c`
(2026-06-30). 887 upstream commits since the last Bun sync point
(`b5ba38a21e17`, 2026-06-16); 117 touch `Source/JavaScriptCore`, 54
touch `Source/WTF`, 10 touch `Source/bmalloc`.

The fork-side work is split across two merge PRs:

- oven-sh/WebKit#261: `b5ba38a21e17` to `ce481c4cfedb`, merged as
`0d9ee56ba4f6`.
- oven-sh/WebKit#263: `ce481c4cfedb` to `d81bcc3d833c`, based on the
fork's current `main`, so it also carries oven-sh/WebKit#257 and
oven-sh/WebKit#262, which landed on the fork between the two merges and
which fix real Bun bugs (see below).

> [!NOTE]
> oven-sh/WebKit#263 has landed on `main` as `c9ad5813fd23`, and
`WEBKIT_VERSION` now points at that commit's release,
`autobuild-c9ad5813fd23bd8b98b0738abc3d037ec716aa92`. Nothing else is
pending on the WebKit side. It was landed as a squash rather than a
merge commit, but `c9ad5813fd23`'s git tree is byte-identical to the
preview head `f652829d78`'s tree (verified: both are `470eee60f5`), so
the final artifacts are built from exactly the source all of the
verification below ran against. The squash does drop the upstream parent
link, so whoever does the next fork upgrade will need a merge-base fixup
like the one that followed oven-sh/WebKit#251.

Fixes #32793

## Bun changes required by this upgrade

### From `b5ba38a2 -> ce481c4c`: three builtin rewrites

Upstream removed three bytecode intrinsics that Bun's built-in JS
modules use (https://bugs.webkit.org/show_bug.cgi?id=318076 and
https://bugs.webkit.org/show_bug.cgi?id=318028). Bumping the version
without these rewrites aborts on every `Buffer.from()` call:

```
ASSERTION FAILED: Private symbol not found: tryGetByIdWithWellKnownSymbol(value, "toPrimitive");
```

and on `new console.Console(stream).table(...)` (the global
`console.table` is native and was unaffected).

- `src/js/builtins/JSBufferConstructor.ts`:
`$tryGetByIdWithWellKnownSymbol(value, "toPrimitive")` becomes an
ordinary `value[Symbol.toPrimitive]` read, which is exactly what Node's
`lib/buffer.js` does. The removed intrinsic never invoked accessors, so
this is also a Node-compat improvement: a getter-defined
`Symbol.toPrimitive` is now honored.
`test/js/node/buffer-from-symbol-to-primitive.test.ts` covers it and
fails on the released Bun.
- `src/js/builtins/ConsoleObject.ts`: `$isMapIterator` /
`$isSetIterator` become `require("node:util/types").isMapIterator /
isSetIterator`, which is exactly what Node's
`internal/console/constructor.js` does.
`test/js/node/console/console-table-iterators.test.ts` is a snapshot
test that passes on both the released Bun and this branch, proving the
rewrite is behavior-preserving (there was no prior coverage for
`Console#table` on a Map/Set iterator).
- `src/js/builtins.d.ts`: the declarations for all ten removed
intrinsics are deleted so nothing reaches for them again.

### From oven-sh/WebKit#257: `jest` fake-time code must use the new
`NaN` sentinel

oven-sh/WebKit#257 changed the "no override is active" sentinel on
`JSGlobalObject::overridenDateNow` from `-1` to `NaN` (see
`JSGlobalObject::jsDateNow()`). Bun's reset paths still wrote `-1`,
which the new semantics read as a *live* override frozen at `-1` ms, so
`jest.useRealTimers()` and `setSystemTime()` with no argument left
`Date.now()` stuck at `1969-12-31T23:59:59.999Z`.
`test/js/bun/test/test-timers.test.ts` ("we can go back in time") caught
this against a Bun built from the #263 artifact.

- `src/runtime/test_runner/timers/FakeTimers.rs`: `CurrentTime::clear`
(the `jest.useRealTimers()` path) writes `f64::NAN` instead of `-1.0`.
- `src/jsc/bindings/JSMockFunction.cpp`, `JSMock__jsSetSystemTime`: the
reset value becomes `PNaN`. The old `>= 0` / `std::isnormal()` gating
existed only to serve the `-1` sentinel and silently dropped every
pre-epoch and zero override (a bug the #257 review called out); with the
`NaN` sentinel every real timestamp is a valid override, so
`setSystemTime(-1)` and `setSystemTime(new Date("1960-01-01"))` now
work. A new test in `test/js/bun/test/test-timers.test.ts` covers the
pre-epoch, zero, `-1`, and no-argument-reset cases and fails on Bun
1.4.0.
- Deleted `JSMock__jsUseRealTimers` from `JSMockFunction.cpp`: nothing
registers it (`jest.useRealTimers` is the Rust `use_real_timers` in
`FakeTimers.rs`), and it was the third place that would have needed the
sentinel change.

`ce481c4c -> d81bcc3d` itself (the 84 upstream commits) requires
nothing: no bytecode intrinsics changed, `JSType.h` did not change, and
the only WebCore code-generator change is to a helper Bun does not use.

## Bun bugs fixed by the fork-side commits this carries

- oven-sh/WebKit#257: `Date.now()` is tagged `DateNowIntrinsic`, so a
hot call site is inlined by the DFG/FTL as a `DateNow` node, and
`operationDateNow` returned the wall clock instead of reading
`JSGlobalObject::overridenDateNow`. A `setSystemTime()` override
therefore silently wore off as soon as a `Date.now()` call site tiered
up (#32793). `test/regression/issue/32793.test.ts` spawns the loop from
that issue and asserts the override never diverges; on the released Bun
it diverges at iteration 99, and it also fails against a build of this
branch's previous pin (`0d9ee56ba4f6`, which predates #257), so the test
isolates exactly this commit.
- oven-sh/WebKit#262: a top-level `import()` whose embedder fetch
rejects with a value that is not an `ErrorInstance` (a single-message
transpile failure rejects with a `BuildMessage`) poisoned its module
registry entry, and every later importer of the same file hung forever.
The Bun-side regression test lives in #33149, which also pins a WebKit
preview; once this lands, #33149 reduces to its test plus its
`scripts/sync-webkit-source.ts` improvement.

## Why the regression tests are spawned fixtures

Without the three builtin rewrites, a Bun built against this WebKit
aborts on the first `Buffer.from()` call:

```
ASSERTION FAILED: Private symbol not found: tryGetByIdWithWellKnownSymbol(value, "toPrimitive");
```

`Buffer.from` is fundamental enough that this takes down the `bun test`
runner itself, before any test file finishes loading and before the
JUnit reporter can write anything. So
`buffer-from-symbol-to-primitive.test.ts` and
`console-table-iterators.test.ts` live in two small files of their own
and spawn a child Bun instead of calling the affected APIs in process: a
child abort becomes an ordinary `exitCode`/`stdout` assertion failure,
whereas an in-process call takes the parent test runner down with it and
reports nothing. Their fail-before is "this branch minus the `src/js/`
rewrites", which is a deterministic SIGABRT:

```sh
git checkout $(git merge-base HEAD origin/main) -- src/js/   # keep scripts/ (the WEBKIT_VERSION bump)
bun bd test test/js/node/buffer-from-symbol-to-primitive.test.ts
# => ASSERTION FAILED: Private symbol not found: tryGetByIdWithWellKnownSymbol(...)  (SIGABRT)
git checkout HEAD -- src/js/
```

`test/js/bun/test/test-timers.test.ts` is the equivalent fail-before for
the sentinel change: with the `src/` diff reverted but the new WebKit
kept, both "we can go back in time" and the new `setSystemTime` test
fail.

`test/regression/issue/32793.test.ts` is different from all of the
above: its fix lives entirely in the vendored engine, selected by
`scripts/build/deps/webkit.ts` rather than by anything under `src/`. So
its before/after is a function of which WebKit artifact is linked, not
of the `src/` diff: it fails on the released Bun (1.4.0), fails against
this branch built with the previous pin `0d9ee56ba4f6`, and passes
against this branch built with the #263 artifact.

## Verification

All of the following were run against a debug Bun built from this branch
and the `autobuild-preview-pr-263-f652829d` artifact.

- The four test files this PR adds or modifies
(`test/js/bun/test/test-timers.test.ts`,
`test/regression/issue/32793.test.ts`,
`test/js/node/buffer-from-symbol-to-primitive.test.ts`,
`test/js/node/console/console-table-iterators.test.ts`): 5 tests, all
pass. Every one fails in the right "before" state as described above.
- Every test file in the repo that exercises `setSystemTime` /
`useFakeTimers` / `useRealTimers` / `advanceTimers*` (the blast radius
of the sentinel change):
`test/js/bun/test/fake-timers/fake-timers.test.ts`,
`test/js/bun/test/fake-timers/sinonjs/fake-timers.test.ts`,
`test/js/bun/cron/in-process-cron.test.ts`,
`test/regression/issue/25869.test.ts`,
`test/regression/issue/26284.test.ts`, and the five
`test/js/third_party/jsonwebtoken/*.test.js` suites. 249 pass, 1 todo, 0
fail.
- One more file turned out to be in that blast radius:
`test/js/bun/test/fake-timers/sinonjs/issue-207.test.ts`. The sentinel
change makes pre-epoch and negative clock values work, so its three
long-`.failing` tests ("should floor negative now values", "should floor
negative start times", "should handle ticks on the negative side of the
Epoch") started passing, which Bun's runner reports as a failure until
the stale marker is removed. `d2309c92c2` removes them; all ten tests in
the file pass against this branch.
- `test/js/node/buffer.test.js`: 539 pass, 1 pre-existing skip, 0 fail.
`test/js/node/console/console.test.ts`: 7 pass. Neither file is modified
by this PR.
- oven-sh/WebKit#263's preview build produced all 43 platform artifacts
with no job failures.

## Upstream changelog

<details>
<summary><code>ce481c4c</code> -> <code>d81bcc3d</code> (the new hop in
this revision)</summary>

Memory safety and security:

- `TypedArray.from()` out-of-bounds read via resizable `ArrayBuffer`
resize/transfer inside the `mapFn` callback
- Stale structure bit in `SlowPutArrayStorage`
- Do not cache property absence on dictionary structures
- Missing `codeBlock->m_lock` in `repatchGetBySlowPathCall`
- Insert a write barrier for `MultiPutByOffset` when it can reallocate
storage
- Unconditionally keep `OMGOSREntryCallee` alive while updating its
callsites
- Disallow defining private names on WasmGC objects
- Size limit on Yarr-generated code

Correctness:

- DFG spread did not account for `cellButterflyOnlyAtomStringsStructure`
- YarrJIT `negativeOffsetIndexedAddress` discarded the adjusted base
register
- `DFGArgumentsEliminationPhase::removeViaKill` did not reset the node
scan index between `InlineCallFrame`s

Other:

- An `ArrayStorage`-specific `GetByVal` DFG operation
- ES2022 private method support in the Web Inspector
- WTF: `TinyLRUCache::findIfCached` / `insert`

</details>

<details>
<summary>Security / correctness fixes (<code>b5ba38a2</code> ->
<code>ce481c4c</code>)</summary>

- Use-after-free after Wasm memory grow via a stale pointer folded by
DFGConstantFoldingPhase
- Keep `JSWebAssemblyMemory` alive from wasm-originated `JSArrayBuffer`s
(UAF)
- Use-after-free of `StreamingCompiler::m_ticket`
- `BBQCallee` kept alive between callsite collection and repatch
(upstreams and extends oven-sh/WebKit#210)
- `Array.from(arguments)` fast path bails out past
`MAX_STORAGE_VECTOR_LENGTH`
- `JSArray::fastFlat` bounds-checked against the maximum legal length
- `Array#flat` fast path was dropping prototype-backed holes in nested
arrays
- `Array.from(map.keys())` fast path was ignoring `Symbol.iterator`
overrides
- `RegExp#@@split` crash on a huge flags string
- `LiteralParser` takes the slow path if the original structure changes
- Missing exit-profile bails on some DFG nodes
- `IteratorClose` in `forEachInIterable` uses the Map/Set's own realm's
iterator structure
- YARR: JIT backreference with a non-BMP character was skipping the next
match start position
- Wasm Memory64: fix parsing of data segment init expressions
- Track `customSlotBase` for `CustomAccessorGetter` /
`CustomAccessorSetter`
- Set `MayStoreHole` appropriately; `"entries"` ArrayIterator emits
`ExitOK` before `NewArray`
- `poisonedDeadOSRExitValue` made crashier and on by default in debug
builds

</details>

<details>
<summary>Language features and spec alignment (<code>b5ba38a2</code> ->
<code>ce481c4c</code>)</summary>

- BigInt Math proposal implemented
- Temporal: spec-alignment passes across `PlainDate`, `PlainTime`,
`Duration`, `Instant`, plus a unified `ParseISODateTime`
- `Intl.PluralRules` reflects `compactDisplay` in its skeleton and
`resolvedOptions()`

</details>

<details>
<summary>Performance (<code>b5ba38a2</code> ->
<code>ce481c4c</code>)</summary>

JavaScript-visible fast paths:

- `JSON.stringify` space/indentation argument handled by
`FastStringifier`
- Fast path for the `RegExp#flags` getter; cached named-capture `groups`
Structure on `RegExp`
- Map/Set iterator `next` and `%RegExpStringIteratorPrototype%.next`
moved to C++
- int32 fast path in `parseInt` for short decimal strings
- `NumericStrings` int cache lookup inlined into DFG/FTL
`ToString(Int32)`
- `Object#isPrototypeOf` uses the `InstanceOf` DFG node
- `Object.freeze` / `seal` / `preventExtensions` no longer allocate
`ArrayStorage` for `NonArray` objects
- Map/Set `set` + `delete` churn no longer expands then immediately
shrinks
- Avoided an intermediate `StringImpl` allocation feeding
`StringBuilder` into `makeString`
- Wasm `intoCharCodeArray` bulk-copies 8-bit strings; unnecessary
watchpoints avoided
- `DFG::GetByVal` widens to `SpecBytecodeTop` instead of forcing an OSR
exit on an empty value profile

YARR (the RegExp engine):

- `latin1Table` for efficient Char8 filtering, reused for Char16 and the
interpreter
- `StringList` optimization when captures are unused; atom fast path
enabled for unicode patterns

JIT compile time (a large batch aimed at DFG/FTL/B3/Air throughput):

- Semi-NCA algorithm for `WTF::Dominators`; reverse post-order in
`WTF::Liveness` and B3 `ReduceStrength`; `SparseBitVector` in
`DFGLivenessAnalysis`
- Unified `SSACalculator`; dominance frontiers computed once per graph
- `AirFixObviousSpills`, `AirEliminateDeadCode`, `Air::RegLiveness`, and
the greedy register allocator all got cheaper
- B3 CSE reimplemented without `B3::Variable`; `B3::Value::effects` uses
a constant table
- `ReduceStrength` avoids fixed-point iteration; `InferSwitch` disabled
in B3 for Wasm
- Fixup-inserted `RegExp` primordial `TryGetById` chains replaced with a
single `CheckStructure`
- Parser: create save points only when actually needed
- Baseline/LLInt profile `op_unsigned` overflow and report int32
overflow to the DFG

</details>

<details>
<summary>WTF, bmalloc, and the build system (<code>b5ba38a2</code> ->
<code>ce481c4c</code>)</summary>

- `SaturatedArithmetic.h` and its APIs renamed to `Saturating` (Bun does
not use these directly)
- Checked arithmetic helpers now require two or more arguments
- `OrderedHashTable` load-factor policy aligned with `HashTable`
- `JSON::Value::dump` no longer corrupts large string values via
`PrintStream` truncation
- Structured clone: the remaining terminal JS value tags moved from
WebCore into JSC (`CloneSerializerBase.h` / `StructuredCloneTags.h`).
Bun keeps its own fork of `SerializedScriptValue.cpp`, so this is
additive.
- Workaround for a GCC 14+ false `-Wuninitialized` in `Variant`;
`[[msvc::no_unique_address]]` used on MSVC
- WTF / libpas exception codes changed to `0xbb08`
- libpas: per-heap tagging policy rework; `pas_deallocate` split into
inline-only and casual variants; PGO applied to WTF/bmalloc
- CMake: prefix headers expanded, headermap generation reworked, stale
staged headers pruned, and the Darwin platform block in `BPlatform.h` /
`pas_platform.h` no longer excludes CMake builds (restored in the fork,
see oven-sh/WebKit#261; without it the Linux-to-macOS cross lane fails
to link `gigacageEnabledForProcess`)

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.