forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 52
Upgrade to upstream WebKit bbc000ae4f3d #404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
475 commits
Select commit
Hold shift + click to select a range
fcd024f
Web Inspector: Canvas: support editing WebGPU shaders
dcrousso 148d230
REGRESSION(318555@main): [GTK] Test inspector/canvas/console-record-o…
dcrousso b48f01b
[JSC][Temporal] Fix constructor newTarget.prototype ordering and unif…
hyjorc1 daa83dc
CSS clip on a child is ignored when determining whether an ancestor's…
Ahmad-S792 9ac9df1
corner-shape: fix hit testing
cupidsity f771c50
[JSC] Use FrameTracer in wasm ref_func, table_get, and array_init_ele…
syg aac6a1e
Update to PDF.js v6.2.108
mcatanzaro 9226ba7
[JSC] Remove enableInt52
Constellation 76f57a9
[JSC] Include ARM64E in the LLInt prologue frame zeroing
Constellation d57023d
Swift IPC message receivers cannot be annotated with EnabledBy
ruthvikkonda a5ce89f
Unreviewed, reverting 318458@main (7d0d43fa56ea)
revert-bot 5cf3b96
[Gardening]: REGRESSION(308970@main): [macOS Debug] imported/w3c/web-…
martadarbinyan 0370be9
Sync css/css-highlight-api
yulunwu2 505c1f4
[block-in-inline] Self collapsing block nested in an inline box loses…
alanbaradlay 6562831
[GFC] Distribute extra space into non-affected tracks.
yulunwu2 7579197
[anon-block-removal] Boxes that lay out their own children must keep …
alanbaradlay d2c01ad
Fix the build for some configurations
rr-codes 9eb3fbd
Shared/service workers don't run in same process after COOP-induced B…
bnham 447c453
[WPE][Clang] Build failing since switch to Clang due to new unused-fu…
clopez bd875a9
[Text Extraction] Add a way to map node identifier strings to `WKFram…
whsieh 2bcee61
[block-in-inline] Trailing whitespace is not collapsed before a block…
alanbaradlay 4ce8e4c
[Flex] Remove margin-trim support from flex layout
alanbaradlay 0e67d7d
[Gardening]: NEW TEST(317810@main): [iOS macOS]4 tests in imported/w3…
martadarbinyan b7505aa
[block-in-inline] Baseline alignment ignores the offset of a block le…
alanbaradlay 2d3a773
RemoteProgressBasedTimelineRegistry keeps empty source entries of thr…
eb13890
Excessive CoreIPCNSURLRequest logging from CoreMedia generated NSURLR…
beidson e0aaff3
[block-in-inline] Empty orthogonal block nested in an inline box stre…
alanbaradlay defc6ff
[block-in-inline] Margin after a block level box on a line is lost on…
alanbaradlay 9510cbd
Null-deref crash in RenderElement::resolvePseudoElementStyle() when a…
swpatters 19c01c1
[WGSL] Use std::forward() in allocateAbstractType() to avoid use-afte…
6fd438a
[JSC][Temporal] Resolve DST gaps through GetPossibleEpochNanoseconds …
hyjorc1 4ed0dfe
[LBSE] Rebaseline four tests and update custom pixel test baseline fo…
nikolaszimmermann 099f93f
[JSC] Fix the memory64 JS APIs
Constellation 0a711e1
Convert CSSValue ValueSeparator to an enum class
colelao 92f76a7
[WebGPU] Remove unused WebGPUDowncastConvertToBackingContext.h includ…
ruthvikkonda 8739923
Web Inspector: Canvas: support highlighting WebGPU render pipelines
dcrousso 27a59f0
REGRESSION(313859@main): SVGForeignObjectElement dynamic x/y take no …
nikolaszimmermann fc93b91
[CMake] Fix the macOS build after SpatialShim.swift was added
zakariaridouh 8f6e322
[anon-block-removal] Empty editable container with only an out-of-flo…
alanbaradlay e492299
[SwiftUI WebKit API] WebPage needs the WKUIDelegatePrivate attachment…
rr-codes 51385a5
requestPictureInPicture() does not consume the user activation
Ahmad-S792 ca26178
Resync `css/CSS2/tables` from WPT Upstream
Ahmad-S792 9fcacd8
Implement JIT Cage Relaxation
Achierius c0316c6
Multicol column height ignores min-height when min-height exceeds max…
Ahmad-S792 2de8879
ImageOverlay text style should be set by the style adjuster and never…
francovs b016905
[block-in-inline] Float inside a block nested in an inline box intrud…
alanbaradlay dff7618
AX: VoiceOver cursor not in sync with mail content breaking Intellige…
utkuuckun 5ee6c01
[CSS Fonts] Apply @font-face metric override descriptors to font metrics
shierote 45afff3
Build fix after 318648@main for !ENABLE(MATHML)
foopoiuyt a011564
[JSC] `Array#sort` without a comparator is not stable
sosukesuzuki 8e51fe6
[WebDriver][WPE] Gardening W32 2026 edition
lauromoura 73b4bbb
SharedWorkerGlobalScope prototype is not an immutable prototype exoti…
cdumez 2c0cc92
[Web Audio] Reduce padding in ParamEvent, AutomationState, AudioNode …
Ahmad-S792 5dd200e
[macOS] ASSERTION FAILED: callback.version < m_cookiesVersion /Volume…
szewai 19b7a8a
REGRESSION(318413@main) [WPE][GTK] Build is broken on GCC < 15
obyknovenius 37462ea
[AppKit Gestures] Simplify WKAppKitGestureController.mm a bit
rr-codes 1f86c27
[css-writing-modes] Add WPT coverage for orthogonal atomic inline chi…
karlcow 9491626
[Grid] margin-trim does not apply to grids.
sammygill d3327c9
Spatial/projected video rendering in macOS and iOS media controls (ex…
e04f9dd
Crash in AccessibilityMenuListPopup::menuListOptionAccessibilityObject
carlosgcampos 3807854
ViewGestureController magnification gesture handling should not need …
aprotyas afa93d4
Updated popover WPT suite to match current content
brentfulgham 42e02bc
[WPEPlatform Wayland] Should handle WEBKIT_INPUT_PURPOSE_SEARCH
fujii 14ddab4
REGRESSION(318489@main) [WPE] Some accessibility tests are constant c…
obyknovenius 4f3ecec
[JSC] `JSON.stringify` fast path should accept final objects with non…
sosukesuzuki 9594026
[GTK][WPE] Build failure with GCC 15: -Werror=uninitialized on m_weak…
aperezdc 2a7c5b4
[CSS Fonts] Enable @font-face metric override descriptors by default
shierote cfecee1
REGRESSION(318489@main) [WPE] Some accessibility tests are constant c…
obyknovenius 1a501aa
[WPE][GTK] `imported/w3c/web-platform-tests/webrtc/RTCIceTransport.ht…
obyknovenius c4816f8
[block-in-inline] Baseline of an inline-block whose last line box hol…
alanbaradlay 1c420e3
REGRESSION(318680@main) `imported/w3c/web-platform-tests/css/css-cond…
obyknovenius 6c0e799
[block-in-inline] Nested inline boxes around a block level box are st…
alanbaradlay 8577db2
AudioWorkletNode processorerror event lacks filename, lineno and colno
cdumez c8cef76
MediaStreamAudioSourceNode captures the wrong track and keeps playing…
cdumez cebda2d
[Custom Highlight] Unmark HighlightRegistry-highlightsFromPoint.html …
megangardner 1fff76c
[MSE][GStreamer] Regressions in YouTube MSE Conformance Tests 2019
eocanha ef6d9ba
[Linux] Remove RT threads
justinmichaud acfe18c
Model computed value line-height more closely to how its specified
weinig f5cac74
Nested @scope with :has(:scope ...) in <scope-start> picks scoping ro…
Ahmad-S792 de6ac85
LibWebRTCAudioModule can use the audio transport after it is unregist…
Ahmad-S792 ec16a43
Fire resize event when iframe viewport transitions from display:none …
Ahmad-S792 4bbe21c
CSS object-view-box: implement rendering for video elements
tangalice 21b4e3f
Unify implementations of Style::resolveLength
weinig d67629d
[Site Isolation] [iOS] Caret inside a cross-site iframe renders at a …
rniwa 9fd7049
[Site Isolation] [iOS] Tapping on a text field does not move the care…
rniwa 4b51232
[block-in-inline] Inline box with cloned decoration generates an extr…
alanbaradlay 44bab33
Unreviewed, build fix for JSCOnly
Constellation 7b4c336
[model] Remove unused <limits> include in LazyLoadModelObserver
ruthvikkonda bf1dab7
[JSC] Remove many 32bit-only concept from JIT
Constellation 0149263
[OpenXR] Swapchains might create multisampled images for no benefit
svillar cdf87a6
Open a color input with display:none via a label
Ahmad-S792 f3f3dfe
moveBefore() isn't updating web inspector
lukewarlow 84e2011
Implement moving steps for source and img elements
lukewarlow fc6640b
[Gardening]: [macOS Debug] imported/w3c/web-platform-tests/wasm/core/…
martadarbinyan 50401aa
Fix CSSUnitType enum member names
colelao 3cafd03
Unreviewed, reverting 318592@main (6a65f66c4bd1)
roberto-apple 516a46e
[WPE] Enable damage propagation by default
carlosgcampos ac7682f
[SwiftBrowser] Typing webkit.org in the URL bar leads to a failed pro…
aprotyas 968a3d3
[AppKit Gestures] Add a few more API tests to test clicking the PDF HUD
rr-codes a955638
[macOS iOS DEBUG]REGRESSION(317335@main): ipc/loadping-firstpartyforc…
charliewolfe 87ac7bf
Add committer status to Jetzel Espinal.
JEspinal01 0e75fb8
[anon-block-removal] White space after an out-of-flow or floated box …
alanbaradlay 56baf6e
Unreviewed, JetStream3 and Speedometer3 regressions
Constellation 8a05d09
Add miscellaneous tests for lazy-loading cross-site frames
jelee53 54f4725
sort-Xcode-project-file emits "uninitialized value" warnings: WebKit.…
yury-s 74091f9
[JSC] Add "Padding" Air opcode
Constellation e15bdc5
[Gardening]: REGRESSION(317964@main): [macOS iOS] ASSERTION FAILED: b…
martadarbinyan ebe9a17
[AppKit Gestures] Clicking on PDF does not show HUD when using the al…
rr-codes 22a13eb
[JSC][Temporal] Align time zone identifier parsing with the spec's pa…
hyjorc1 11a216a
[Site Isolation] Some website policies applied to main frame navigati…
beidson 6380373
[JSC] Use counting sort for `Array#sort`
sosukesuzuki 6412a2d
getBoundingClientRect() returns a non-zero rect for SVG elements insi…
karlcow 81a1170
[JSC] RegExp trim fast path in `String#replace` is skipped once the c…
sosukesuzuki d967cb6
[AppKit Gestures] Disable some tests that are failing, and enable som…
rr-codes 083734c
[WebTransport] Incoming datagram bursts are dropped because delivery …
basuke 2118488
Global object attribute getters/setters throw when called as bare fun…
cdumez 3b87c97
REGRESSION(314923@main): [CMake] Give the Swift Clang importer the sa…
clopez 4fdc110
[Site Isolation] WebProcessProxy::m_sharedProcessDomains only tracks …
szewai 5716908
[LBSE] Do not seed the filter region with the object bounding box for…
nikolaszimmermann 14bf939
ScrollingPerformanceTestMomentumInterval is closed immediately if the…
connorpobrien b0089a4
ctx.font does not re-resolve relative font sizes when set to the same…
Ahmad-S792 a24d4cb
[libpas] Inline PAS_MTE_HANDLEs which resolve to PAS_MTE_CLEAR*
Achierius 59aa7b7
Remove extraneous .get() calls from RemoteAudioTrackProxy, RemoteCDMP…
jelee53 7f8d70c
Web Extensions load with significant delay on iOS 26.6 when Safari is…
szewai b13e326
[ews-build] Cherry-picking a change you reviewed fails validate-commi…
TheBoyRoy05 99ba7be
[Custom Highlight] Support the shadowRoots option in HighlightRegistr…
megangardner fc4482e
Unreviewed, reverting 318754@main (a24d4cb147c0)
revert-bot b39e517
Remove remaining SVGPathElement's SVGPathSegList members
cdumez 906e60b
[WebDriver][Tools] Fix pytest_collection_modifyitems to support prope…
lauromoura c6bd8ac
SVGSVGElement.currentScale is a no-op on non-document-root outermost …
karlcow 4405983
[Site Isolation] First-party sites should not enter shared process
szewai 01ea2a8
[JSC] `String#split` should not atomize the results of a non-atom sub…
sosukesuzuki 95ffc89
[JSC] `JSC_JIT_CAGE_PROBE{,_IMPL}` fallback macros in `JITOperationVa…
sosukesuzuki f261a90
[WebDriver][WPE] Gardening W32 2026 edition
lauromoura f9278fb
Turn on the back/forward cache for all web-platform-tests
cdumez 3e31762
[Site Isolation] Stale iframe layers are left hosted after a cross-pr…
atar13 3ef9007
REGRESSION(314540@main): When damage propagation is turned on, scroll…
nikolaszimmermann 65b9c93
[GTK][WPE] Disable UseDamagingInformationForCompositing by default
carlosgcampos 1eb4c74
[macOS] Support gesture event handling without a backing NSEvent
aprotyas 4c31e54
[Site Isolation] http/tests/site-isolation/iframe-reinsert-same-src-c…
aa6c61f
[GTK][WPE][CMake] Do not allow to build with make, require ninja inst…
clopez 2bed988
Unreviewed, update test262
Constellation a1678ff
REGRESSION(311768@main): :focus-visible incorrectly shown after focus…
karlcow 4cdafb4
[site-isolation] http/tests/webrtc/audioSessionInFrames.html is a per…
jyavenard a0c9c2f
CryptoAlgorithmX25519ParamsInit.h: Fix typo "version 2,1"
fujii 2c529b8
MediaRecorder drops a frame whenever the writer input reports not ready
iidmsa 9334b44
[Custom Highlight] ::highlight() pseudo-elements should inherit from …
anttijk f641af0
Add missing writeBarrier to Array.unshift
kmiller68 db5ab47
Network cache traversal decodes every record in full just to read its…
szewai 0848b3f
[block-in-inline] A block whose content is a table is treated as self…
alanbaradlay 411d06d
[anon-block-removal] Fix editing/selection/end-of-document.html
alanbaradlay 2c2c1af
[JSC] Overhaul ArrayBuffer & Wasm::Memory sizing with memory64
Constellation 399973c
[JSC][Temporal] Implement ISODateToFields and CalendarMergeFields as …
hyjorc1 e5dca40
[Gardening]: REGRESSION(318767@main): [macOS Release] imported/w3c/we…
martadarbinyan a06f835
Fail early when buildmaster configuration is incomplete
aj062 d3ad598
Fix TestWTF on arm64 linux
justinmichaud eb46d8c
Dynamically created cross-site iframe gets stuck on about:blank after…
pvollan 6815dd9
Web Extensions sidebar is rendered per-tab instead of per-window, eve…
AriYoung00 062e393
[WPE] Expose WebKitClipboardPermissionRequest API
TingPing 428fd73
[block-in-inline] A block level box's margin after is counted twice w…
alanbaradlay 71c68f4
[JSC] Retire Lexer::lexExpectIdentifier()
ast-hugger af624ad
Web Inspector: Canvas: distinguish configured WebGPU `<canvas>` from …
dcrousso ff7f28a
Give Issac Roy committer status
TheBoyRoy05 f5b7a0e
Site-isolated iframe processes keep a page load assertion after a cro…
bnham 35cfc0b
Plug-in byte-range requests are blocked by connect-src instead of bei…
charliewolfe b86307c
REGRESSION(283572@main): Canvas ctx.font keywords larger and smaller …
Ahmad-S792 186929f
Performance seems slower with attached shader in Safari
mwyrzykowski bbab514
[JSC] LazyJSValue::emit leaks a StringImpl reference when finalizatio…
dhecht 76df1b9
Rename SVGPathSegList to SVGPath to reflect its actual role
cdumez 547e155
[JSC] Align Iterator#chunk / Iterator#windows to the latest spec
Constellation 9f9cfc1
[Build] Support public builds on the macOS 27 SDK
ryanhaddad da21559
[ASan] Generate a crash log when a process is killed for a failed IPC…
3c2f9ab
scrollend event is not fired when wheel-scrolling a subframe
cdumez 7417386
[JSC] Align Iterator#join to the latest spec
Constellation 0496fa6
[WPE] Add WebView::run-color-chooser API
TingPing 9ef04da
[JSC] Intl.Locale's collections should be sorted
Constellation 7618e8e
Unreviewed, fix stale test
Constellation 65b1821
Remove incorrect NODELETE annotations from Source/WebCore/css
rniwa acf8a9b
[SwiftBrowser] URL field does not reflect the committed URL after nav…
aprotyas b29eae8
[GLib] Fix webkit_favicon_database_get_page_icons() lookups
TingPing 039dce8
Unreviewed, fix weird formatting
Constellation d5bec83
[Gardening]: [macOS] imported/w3c/web-platform-tests/webrtc/RTCRtpRec…
martadarbinyan 8795857
Restrict length values passed via script for the WebAnimation rangeSt…
weinig 49d0165
[LBSE] Masked SVG content is cut off at the edges of the transparency…
nikolaszimmermann 6050a91
[LBSE] Fix remaining mask issues
nikolaszimmermann 99f7fae
[LBSE] Update baseline + TestExpectations
nikolaszimmermann 18a9a4a
[WPE][cross-toolchain-helper] webkitdevci builds fail on hosts with g…
nikolaszimmermann 7b1a9ea
[Site Isolation] Remove dead process-qualified media identifier plumbing
zakariaridouh c7ed9fc
[JSC] Propagate uint64_t index until we do bound-check for TypedArray
Constellation e0a4c3f
Accelerated convertImagePixels for PixelFormat::RGBA16F
squelart c2a2669
[css-anchor-position] Refactor how position-anchor: none and normal work
tuankiet65 9f82586
Remove `using WTF::Task` since it conflicts with Swift's Task
rr-codes b1b0566
[JSC] Wasm table.copy should not use index to check identity
Constellation 2e8a96a
[JSC] Fix Wasm memory64 memarg offset parsing
Constellation c110cc1
Label default action incorrectly triggers when clicked interactive co…
cdumez 1194eb4
[GTK][WPE] Gardening of tests - 2026-08-07
kate-k-lee e07ecf4
[JSC][Temporal] Replace the four monthCode search walks with one prim…
hyjorc1 707048f
[JSC] WebAssembly.Memory.prototype.type() needs to report current size
Constellation 3e351c7
[JSC] SerializedScriptValue is not carrying memory64 flag
Constellation 23cf2c3
LibWebRTCAudioModule.h should not be a private header
1d21417
Web Extensions: Add support for the offscreen API
b-weinstein aa8167a
[JSC] Table64 size should be checked when creating / growing, not par…
Constellation b1bfab6
Unreviewed, use WASM_FAIL_IF_HELPER_FAILS
Constellation 37cfccb
Fix crash from double-consuming the pending exception in DeferredProm…
kmonsen f111101
Embedded PDFs do not re-fit when the plugin frame is resized
aprotyas 334a261
[AppKit Gestures] NSWindows are left behind after each test when runn…
rr-codes 445ef5a
Add animation forwarding to child models in spatial portals
bb345ab
Drop cached SequesteredMalloc arena granules on memory-pressure notif…
Achierius 96aa8e8
[GLib] layout test gardening
fujii e10f767
[GFC] Convert percentages in grid-auto-rows/grid-auto-columns to auto…
kmonsen 72928a5
[JSC] Reserve 0-slot cached memory base and size even when a module d…
Constellation c4357d1
Release Mach port rights
Constellation dfc0426
[Unified PDF] PDF HUD should show toggle for accessibility filters
lilyspiniolas f880bc5
RefCountedWithInlineWeakPtr is undef in GCC 15
geoffreygaren b2ec9a4
[JSC][Intl] formatToParts must emit the era separator that format() i…
hyjorc1 75bb189
Stop including <objc/objc-runtime.h> and forbid it via check-webkit-s…
12b2b07
Safari MCP: default text extraction on www.yelp.com contains many hid…
whsieh 919642b
Introduce an API test for MediaRecorder dropping a frame whenever the…
iidmsa 5e3ca7a
Sync `html/semantics/scripting-1/the-script-element/module` from WPT …
Ahmad-S792 c476e1a
[GLib] layout test gardening 2026-08-09
fujii 6850883
Clicking an element nested inside a checkbox/radio wrongly activates …
cdumez 7b5e7da
[YARR] `\P{...}` on the right side of a v-mode `&&` or `--` becomes a…
sosukesuzuki ba411cf
Unreviewed, speculative fix
Constellation 2f72b3d
[Skia] Skip damage restriction when the damage covers the whole draw
nikolaszimmermann 9010d6d
[Skia] Re-enable damage in composition feature
nikolaszimmermann 8cbbfc9
Remove non-standard `percentage` value from `-webkit-line-clamp`
Ahmad-S792 42a5b53
[GStreamer][MSE] Avoid spurious seek to 0 when seeking to end
ntrrgc 399d049
Resync `css-link-params` from WPT Upstream
Ahmad-S792 abb3ac9
Update fetch/compression-dictionary from WPT
fred-wang c4fb679
[GTK] Create WebKitWebExtensionContext Options Page API
ItsJamie9494 51cb494
[LBSE] Update pixel test baseline
nikolaszimmermann dc865d0
Canvas with float16 should use an extended DestinationColorSpace
squelart ec92002
[site-isolation] media/audioSession/audioSessionType-web-audio.html i…
jyavenard 2ffd96d
Resync `css/CSS2/normal-flow` from WPT Upstream
Ahmad-S792 9f39c1d
BaseAudioContext::clear() leaks AudioNodes marked for deletion during…
Ahmad-S792 c5b0051
Zero-duration exponentialRampToValueAtTime() at a non-frame-aligned t…
Ahmad-S792 f075fe9
Reverse playback of buffers longer than 2^23 frames extrapolates outs…
Ahmad-S792 3b45c0a
Setting ConvolverNode.buffer to null does not release the impulse res…
Ahmad-S792 455ecdc
AX: run more tests with isolated-tree flag on (2 of many)
minorninth 6a1ef9a
[YARR] Interpreter should skip every once-through alternative after a…
sosukesuzuki 291f67b
[LBSE] Don't rebuild objectBoundingBox gradients on layout size change
nikolaszimmermann 40d37f3
[JSC] memory64 should accept large sized page numbers in module parsi…
Constellation cc673d7
[JSC] Update import-defer implementation based on the proposal update
Constellation d02c68d
[JSC] Fix memory related wasm parsing
Constellation 23f473f
[GLib] layout test gardening 2026-08-10
fujii d6d0457
Skip fill/stroke CGColor conversion for gradient and pattern brushes
nikolaszimmermann 0e231f0
Background image is not repainted when only the URL fragment identifi…
Ahmad-S792 b113f83
[SVG] animateMotion walks the animation path up to 4 times per frame
Ahmad-S792 bbc000a
[YARR] Read raw code units for surrogate-free BMP character classes i…
sosukesuzuki 6c4096e
Merge remote-tracking branch 'upstream/main' into bun/upgrade-to-bbc0…
robobun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # JSTests | ||
|
Check failure on line 1 in JSTests/README.md
|
||
|
|
||
| ## Running Tests | ||
|
|
||
| Tests are not always set up to run directly. Instead run them through `Tools/Scripts/run-javascriptcore-tests`, which runs everything, or `Tools/Scripts/run-jsc-stress-tests <collection>`, which runs a specific subset. For day-to-day development, the `JSTests/stress` and `JSTests/wasm.yaml` collections are sufficient for catching most bugs. | ||
|
|
||
| Tests are run in a variety of different JSC configurations, for example with various JIT tiers disabled, concurrent compilation off, or the GC running continuously. These configurations show up as a suffix on the test name. For example, `stress/array-push.js.ftl-eager-no-cjit` corresponds to `JSTests/stress/array-push.js` with tier-up thresholds lowered and concurrent JIT off. | ||
|
|
||
| `run-jsc-stress-tests` looks for a `jsc` in the release build directory unless `--debug` or `--jsc <path>` is passed. `run-javascriptcore-tests` builds one first unless `--no-build` or `--root <path>` is passed. | ||
|
|
||
| `run-jsc-stress-tests` takes a collection (a directory or a `.yaml` file), not a single test file. To run a limited subset, pass `--filter <regex>`, which will pattern match on the test's name/configuration. e.g. `run-jsc-stress-tests JSTests/stress --filter array-push`. | ||
|
|
||
| ## Adding Tests | ||
|
|
||
| Put tests that only target JS behavior in `JSTests/stress` and tests that involve wasm in `JSTests/wasm/stress`. | ||
|
|
||
| New tests are *required* to adhere to the following rules: | ||
|
|
||
| 1. Tests must run in under 200ms in all configurations. This can be checked by passing `--report-execution-time` to `run-jsc-stress-tests`. | ||
| 2. Use `testLoopCount` or `wasmTestLoopCount` to control how many iterations a test runs. The `jsc` CLI sets these based on the configuration of the test, so tests iterate enough to tier up where that matters and exit early where it doesn't. | ||
| 3. Tests fail by crashing or throwing an uncaught exception, so assertions must throw rather than print. Add `//@ mustCrash!` or `//@ requireOptions("--exception=<exception-name>")` to the top of the test file if testing expected crashes/exceptions, respectively. | ||
| 4. Don't print or log unless a test is about to fail. Test output goes straight to the terminal, so extra logging is noisy and disruptive. | ||
| 5. Make sure the test actually reproduces the bug. Run the test against a build without the fix and make sure it fails. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| var keys = []; | ||
| for (var i = 0; i < 40; ++i) { | ||
| var name = ""; | ||
| for (var j = 0, x = i * 2654435761; j < 6; ++j, x = (x * 48271 + 12345) | 0) | ||
| name += String.fromCharCode(97 + ((x >>> 8) % 26)); | ||
| keys.push(name + (i % 3 ? "Id" : "Name")); | ||
| } | ||
| for (var i = 0; i < 5e4; ++i) | ||
| keys.slice().sort(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| class Component { | ||
| constructor(seed) { this.state = seed | 0; } | ||
| handleClick(e) { return this.state + e; } | ||
| onScroll(x) { return this.state - x; } | ||
| render() { | ||
| const onClick = this.handleClick.bind(this); | ||
| const onScr = this.onScroll.bind(this, 2); | ||
| return onClick(1) + onScr(); | ||
| } | ||
| } | ||
|
|
||
| var shorthand = { | ||
| handle(e) { return e; }, | ||
| }; | ||
|
|
||
| var component = new Component(3); | ||
| for (var i = 0; i < 1e5; ++i) { | ||
| component.render(); | ||
| shorthand.handle.bind(shorthand); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| //@ $skipModes << :lockdown if $buildType == "debug" | ||
|
|
||
| let seed = 12345; | ||
| function next() { | ||
| seed = (seed + 0x9e3779b9) | 0; | ||
| let z = seed; | ||
| z = Math.imul(z ^ (z >>> 16), 0x85ebca6b); | ||
| z = Math.imul(z ^ (z >>> 13), 0xc2b2ae35); | ||
| return (z ^ (z >>> 16)) >>> 0; | ||
| } | ||
|
|
||
| const colors = ["red", "blue", "green", "black", "white"]; | ||
| const sizes = ["S", "M", "L", "XL"]; | ||
| const items = []; | ||
| for (let i = 0; i < 2000; ++i) { | ||
| items.push({ | ||
| id: "item-" + (1000 + next() % 9000) + "-" + colors[next() % colors.length], | ||
| sku: "SKU-" + (10000 + next() % 90000) + "-" + sizes[next() % sizes.length], | ||
| owner: "user-" + (next() % 100000).toString(36), | ||
| parent: "ord-" + (next() % 1e6), | ||
| status: next() & 1 ? "active" : "archived", | ||
| }); | ||
| } | ||
| const json = JSON.stringify({ items }); | ||
|
|
||
| // Each payload carries a distinct set of short ID-like string values, as successive API responses would. | ||
| const separators = "GHIJKLMNOPQRSTUVWXYZghijklmnopqrstuvwxyz"; | ||
| const payloads = []; | ||
| for (let i = 0; i < separators.length; ++i) | ||
| payloads.push(json.replaceAll("-", separators[i])); | ||
|
|
||
| for (let i = 0; i < 240; ++i) | ||
| JSON.parse(payloads[i % payloads.length]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| class Address { | ||
| constructor(i) { | ||
| this.street = "Street " + i; | ||
| this.city = "City"; | ||
| this.zip = 10000 + i; | ||
| } | ||
| } | ||
|
|
||
| class User { | ||
| constructor(i) { | ||
| this.id = i; | ||
| this.name = "user" + i; | ||
| this.email = "user" + i + "@example.com"; | ||
| this.active = (i & 1) === 0; | ||
| this.address = new Address(i); | ||
| this.tags = ["a", "b", "c"]; | ||
| } | ||
| get displayName() { return this.name.toUpperCase(); } | ||
| greet() { return "hi " + this.name; } | ||
| } | ||
|
|
||
| class Admin extends User { | ||
| constructor(i) { | ||
| super(i); | ||
| this.level = i % 5; | ||
| } | ||
| } | ||
|
|
||
| let users = []; | ||
| for (let i = 0; i < 40; ++i) | ||
| users.push((i % 4) === 0 ? new Admin(i) : new User(i)); | ||
| let payload = { ok: true, count: users.length, data: users }; | ||
|
|
||
| let result; | ||
| for (let i = 0; i < 2e4; ++i) | ||
| result = JSON.stringify(payload); | ||
| if (result.length !== JSON.stringify(JSON.parse(result)).length) | ||
| throw new Error("bad"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| (function(a, b) { | ||
| var n = 200000; | ||
| var result = 0; | ||
| for (var i = 0; i < n; ++i) { | ||
| result += a.localeCompare(b, "en"); | ||
| } | ||
| if (result != n) | ||
| throw "Error: bad result: " + result; | ||
| })("yes", "no"); |
19 changes: 19 additions & 0 deletions
19
JSTests/microbenchmarks/regexp-buffer-boundary-anchor-end.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| //@ requireOptions("--useRegExpBufferBoundaries=1") | ||
|
|
||
| (function() { | ||
| var urls = []; | ||
| for (var i = 0; i < 1000; i++) | ||
| urls.push("https://cdn.example.com/assets/build/" + i + "/static/media/components/very/deeply/nested/directory/structure/image-" + i + (i % 7 == 0 ? ".png" : ".webp?width=1024&quality=80")); | ||
|
|
||
| var re = /\.png\z/u; | ||
| var n = 400; | ||
| var result = 0; | ||
| for (var i = 0; i < n; i++) { | ||
| for (var j = 0; j < urls.length; j++) { | ||
| if (re.test(urls[j])) | ||
| result++; | ||
| } | ||
| } | ||
| if (result !== n * 143) | ||
| throw "Error: bad result: " + result; | ||
| })(); |
20 changes: 20 additions & 0 deletions
20
JSTests/microbenchmarks/regexp-buffer-boundary-anchor-start.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| //@ requireOptions("--useRegExpBufferBoundaries=1") | ||
|
|
||
| (function() { | ||
| var source = ""; | ||
| for (var i = 0; i < 4000; i++) | ||
| source += "const value" + i + " = compute(" + i + "); // no shebang, no BOM\n"; | ||
|
|
||
| var shebang = /\A#!.*\n/u; | ||
| var bom = /\A\uFEFF/u; | ||
| var n = 1000; | ||
| var result = 0; | ||
| for (var i = 0; i < n; i++) { | ||
| if (shebang.test(source)) | ||
| result++; | ||
| if (bom.test(source)) | ||
| result++; | ||
| } | ||
| if (result !== 0) | ||
| throw "Error: bad result: " + result; | ||
| })(); |
27 changes: 27 additions & 0 deletions
27
JSTests/microbenchmarks/regexp-u-flag-character-class-greedy.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // /u greedy character classes (\w, [a-z], \d) that hold no non-BMP or surrogate members, over UTF-16 text. | ||
| function splitmix32(seed) { | ||
| var a = seed; | ||
| return function () { | ||
| a |= 0; a = (a + 0x9e3779b9) | 0; | ||
| var t = a ^ (a >>> 16); t = Math.imul(t, 0x21f0aaad); | ||
| t = t ^ (t >>> 15); t = Math.imul(t, 0x735a2d97); | ||
| return ((t = t ^ (t >>> 15)) >>> 0) / 4294967296; | ||
| }; | ||
| } | ||
| let rnd = splitmix32(42); | ||
| let words = []; | ||
| for (let i = 0; i < 60; ++i) { | ||
| let n = 300 + (rnd() * 400 | 0); | ||
| let w = ""; | ||
| for (let j = 0; j < n; ++j) | ||
| w += String.fromCharCode(0x61 + (rnd() * 26 | 0)); | ||
| words.push(w + (rnd() * 100000 | 0)); | ||
| } | ||
| let text = words.join(" あ "); | ||
|
|
||
| let identifier = /^(?:\w+(?: あ )?)+$/u; | ||
| let word = /^(?:[a-z]+\d+(?: あ )?)+$/u; | ||
| for (let i = 0; i < 2000; ++i) { | ||
| if (!identifier.test(text) || !word.test(text)) | ||
| throw new Error("bad match"); | ||
| } |
11 changes: 11 additions & 0 deletions
11
JSTests/microbenchmarks/regexp-u-flag-class-astral-subject.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // BMP-only /u character class scanning a subject dense in surrogate pairs. | ||
| let unit = "\u{1F600}a\u{1F601}bcd"; | ||
| let text = ""; | ||
| for (let i = 0; i < 4000; ++i) | ||
| text += unit + (i % 10); | ||
|
|
||
| let re = /^(?:[\u{1F600}\u{1F601}]+[a-z0-9]+)+$/u; | ||
| for (let i = 0; i < 1500; ++i) { | ||
| if (!re.test(text)) | ||
| throw new Error("bad match"); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| function test(str, re) | ||
| { | ||
| return str.replace(re, ""); | ||
| } | ||
| noInline(test); | ||
|
|
||
| const strs = []; | ||
| for (let k = 0; k < 16; k++) | ||
| strs.push("a".repeat(200 + k * 50) + " \t\n".repeat(k & 3)); | ||
|
|
||
| const re = /\s+$/; | ||
|
|
||
| let result; | ||
| for (let i = 0; i < 1000000; ++i) | ||
| result = test(strs[i & 15], re); | ||
|
|
||
| if (test("hello ", re) !== "hello") | ||
| throw new Error("bad result: " + test("hello ", re)); |
18 changes: 18 additions & 0 deletions
18
JSTests/microbenchmarks/string-replace-regexp-trim-start.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| function test(str, re) | ||
| { | ||
| return str.replace(re, ""); | ||
| } | ||
| noInline(test); | ||
|
|
||
| const strs = []; | ||
| for (let k = 0; k < 16; k++) | ||
| strs.push(" \t\n".repeat(k & 3) + "a".repeat(200 + k * 50)); | ||
|
|
||
| const re = /^\s+/; | ||
|
|
||
| let result; | ||
| for (let i = 0; i < 1000000; ++i) | ||
| result = test(strs[i & 15], re); | ||
|
|
||
| if (test(" hello", re) !== "hello") | ||
| throw new Error("bad result: " + test(" hello", re)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // CSV-style row parsing where each subject string is built at runtime (not an atom), | ||
| // so String.prototype.split must not atomize the parts nor consult the split cache. | ||
|
|
||
| const words = ["alpha", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel"]; | ||
|
|
||
| function parseRow(row) | ||
| { | ||
| return row.split(","); | ||
| } | ||
| noInline(parseRow); | ||
|
|
||
| let count = 0; | ||
| let seed = 1; | ||
| for (let i = 0; i < 3e5; ++i) { | ||
| seed = (seed * 1103515245 + 12345) >>> 0; | ||
| const row = words[seed & 7] + i + "," + words[(seed >>> 3) & 7] + (i + 1) + "," + words[(seed >>> 6) & 7] + (i + 2) + "," + words[(seed >>> 9) & 7] + (i + 3); | ||
| const parts = parseRow(row); | ||
| count += parts.length + parts[2].length; | ||
| } | ||
| if (count !== 4379333) | ||
| throw new Error("bad count: " + count); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function substring(string, start, end) | ||
| { | ||
| return string.substring(start, end); | ||
| } | ||
| noInline(substring); | ||
|
|
||
| for (var i = 0; i < 1e6; ++i) | ||
| substring("Cocoa", 3, 3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function substring(string, start, end) | ||
| { | ||
| return string.substring(start, end); | ||
| } | ||
| noInline(substring); | ||
|
|
||
| for (var i = 0; i < 1e6; ++i) | ||
| substring("Hello, World", 2, 9); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function substring(string, start) | ||
| { | ||
| return string.substring(start); | ||
| } | ||
| noInline(substring); | ||
|
|
||
| for (var i = 0; i < 1e6; ++i) | ||
| substring("Cocoa", 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function substring(string, start, end) | ||
| { | ||
| return string.substring(start, end); | ||
| } | ||
| noInline(substring); | ||
|
|
||
| for (var i = 0; i < 1e6; ++i) | ||
| substring("Cocoa", 2, 3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function substring(string, start, end) | ||
| { | ||
| return string.substring(start, end); | ||
| } | ||
| noInline(substring); | ||
|
|
||
| for (var i = 0; i < 1e6; ++i) | ||
| substring("Cocoa", 4, 1); |
19 changes: 19 additions & 0 deletions
19
JSTests/microbenchmarks/temporal-zoned-date-time-time-zone-cache.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| //@ requireOptions("--useTemporal=1") | ||
|
|
||
| // Guards the UCalendar TinyLRUCache in TimeZoneICUBridge.cpp (timeZoneCacheEntry, | ||
| // capacity 16). Cycling 12 named zones fits the cache; a smaller capacity evicts | ||
| // before reuse and pays ucal_open (~900ns) on every access. | ||
| const zones = [ | ||
| "America/Vancouver", "America/Denver", "America/Chicago", "America/New_York", | ||
| "America/Sao_Paulo", "Europe/London", "Europe/Paris", "Africa/Cairo", | ||
| "Asia/Kolkata", "Asia/Tokyo", "Australia/Sydney", "Pacific/Auckland", | ||
| ]; | ||
| const instant = Temporal.Instant.fromEpochMilliseconds(1750000000000); // 2025-06-15T15:06:40Z | ||
| const zdts = zones.map(zone => instant.toZonedDateTimeISO(zone)); | ||
|
|
||
| let acc = 0; | ||
| for (var i = 0; i < 2400000; ++i) | ||
| acc += zdts[i % zdts.length].offsetNanoseconds / 900e9; // ICU offset lookup per iteration | ||
|
|
||
| if (acc !== 14000000) | ||
| throw "Bad result: " + acc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| //@ requireOptions("--useImportDefer=1") | ||
| import { shouldBe, shouldThrow } from "./resources/assert.js"; | ||
| import { blocker, aStarted } from "./import-defer/async-cycle-setup.js"; | ||
|
|
||
| // SCC {tla, member}: tla has TLA and is the cycle root, member is the non-root member. | ||
| // While tla is suspended on the blocker, member has already reached EVALUATED even though the | ||
| // cycle has not finished. The deferred module behind ns depends on member, so it still cannot be | ||
| // evaluated synchronously: ReadyForSyncExecution must consult IsModuleSCCEvaluated(member), which | ||
| // follows [[CycleRoot]], rather than member's own [[Status]]. | ||
|
|
||
| const evaluations = globalThis.asyncCycleEvaluations; | ||
|
|
||
| const pTLA = import("./import-defer/async-cycle-tla.js"); | ||
| await aStarted.promise; | ||
|
|
||
| shouldBe(JSON.stringify(evaluations), JSON.stringify(["toucher", "member", "A-before-await"])); | ||
|
|
||
| shouldThrow(() => globalThis.asyncCycleTouch(), "TypeError: Unable to synchronously evaluate deferred module"); | ||
| shouldBe(JSON.stringify(evaluations), JSON.stringify(["toucher", "member", "A-before-await"])); | ||
|
|
||
| blocker.resolve(); | ||
| await pTLA; | ||
|
|
||
| // The cycle root is EVALUATED now, so the same access succeeds and evaluates only the deferred module. | ||
| shouldBe(globalThis.asyncCycleTouch(), 1); | ||
| shouldBe(JSON.stringify(evaluations), JSON.stringify(["toucher", "member", "A-before-await", "A-after-await", "deferred"])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import "./async-cycle-member.js"; | ||
|
|
||
| globalThis.asyncCycleEvaluations.push("deferred"); | ||
| export const value = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import "./async-cycle-tla.js"; | ||
| import "./async-cycle-toucher.js"; | ||
|
|
||
| globalThis.asyncCycleEvaluations.push("member"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| globalThis.asyncCycleEvaluations = []; | ||
|
|
||
| export const blocker = Promise.withResolvers(); | ||
| export const aStarted = Promise.withResolvers(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { blocker, aStarted } from "./async-cycle-setup.js"; | ||
| import "./async-cycle-member.js"; | ||
|
|
||
| globalThis.asyncCycleEvaluations.push("A-before-await"); | ||
| aStarted.resolve(); | ||
| await blocker.promise; | ||
| globalThis.asyncCycleEvaluations.push("A-after-await"); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 The conflict resolution in
Source/JavaScriptCore/builtins/BuiltinExecutables.cpp:227(outside GitHub's 300-file diff window) references bareisAsyncFunction, which is not in scope in the newcreateExecutable(..., const BuiltinSourceMetadata& scanned, ...)overload — this is an undeclared-identifier compile error on every platform. Line 223 was correctly updated toscanned.isAsyncFunctionper the PR description, but line 227 was missed; change it toif (scanned.isAsyncFunction).Extended reasoning...
What the bug is
Upstream commit
81d660ceeb2erefactoredBuiltinExecutables::createExecutable()so that the source-scanning locals (hasRestParam,isAsyncFunction,parametersStart, etc.) are now computed in a separate static helpercomputeBuiltinSourceMetadata()and returned as aBuiltinSourceMetadatastruct. The results are then passed into a new overload:The fork carries a downstream patch (from bug 304740) that bumps
implementationVisibilitytoPrivatefor async builtins. When re-applying that patch on top of the refactor, the merge produced this at lines 223–228:Line 223 correctly reads
scanned.isAsyncFunction, but line 227 was left as the bare identifierisAsyncFunction.Why nothing brings it into scope
Verified against the source at HEAD (merge commit
6c4096e6f5):isAsyncFunctionis declared at line 96 insidecomputeBuiltinSourceMetadata(), which is a separate function that returns at line 192.BuiltinExecutables.h:63definesisAsyncFunctiononly as a field ofBuiltinSourceMetadata, not as a member ofBuiltinExecutables.#ifin the file is at line 293.So at line 227 there is no
isAsyncFunctionin scope: not a local, not a parameter, not a member.Step-by-step proof
createExecutable(VM&, const SourceCode&, const BuiltinSourceMetadata& scanned, ...)at line 203.scanned.isAsyncFunction— OK, that's the struct field.isAsyncFunction. Local scope: none. Parameter scope: none. Class scope (BuiltinExecutables): no such member. Namespace/global: none.Impact
This is a hard compile error that will break every build target (
jsc, static libs, Bun link) on every platform (macOS, Linux glibc/musl, Windows). The PR description says the debug build succeeded and that this hunk "now reads scanned.isAsyncFunction", but the committed code at6c4096e6f5contradicts that — the verification build was almost certainly done before the final push, or against a working tree where line 227 had already been fixed but the fix was not staged.Fix
Change line 227 from
if (isAsyncFunction)toif (scanned.isAsyncFunction), matching line 223.