forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 45
Upgrade to upstream WebKit 24362e675175 #251
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
Merged
Merged
Changes from 250 commits
Commits
Show all changes
467 commits
Select commit
Hold shift + click to select a range
5eb4c53
[WPE][GTK] Add User-Agent quirk for HBO Max
philn d1c5b2c
[export-w3c-test-changes] Support --delete-existing/--no-delete-existing
gsnedders 1dc64ec
[CMake] Optimize configuration
geoffreygaren 09f89f0
Take further steps to improve build parallelism
brentfulgham a291a69
Add runtime toggle for appearance defaults
mwyrzykowski b148037
[iOS] The UI process should not have access to the temp and cache fol…
pvollan 08e81b2
Update web-platform-tests/tools
gsnedders 5dcb530
[AutoFill Debugging] Fall back to extracting class names/id in the ab…
whsieh c6900eb
[JSC] Promise combinator's array should get vector-hint based on iter…
Constellation 076f387
[iOS] Remove obsolete sandbox extensions for the Network extension
pvollan 7b0aff1
[JSC] Clean up JSPromiseCombinatorsGlobalContext
Constellation ce2cb07
Fix scroll overcompensation of fixed anchor-positioned elements when …
fantasai 3fa40e6
Cross origin iframes should not be able to set the app badge.
beidson b1f0940
[GTK][WPE] Gardening of tests - 2026-06-09 (x86_64)
nikolaszimmermann 4b1e8e1
[WPE] Gardening of tests - 2026-06-09 (arm64)
nikolaszimmermann eef93d3
[YARR] Optimize save and restore ParenContext
Constellation 951c3a1
[Gardening]REGRESSION(314534@main?): [macOS] media/media-source/media…
diegodelatoba a34f900
Fix missing `message == ` in XPCEndpointClient.mm
cdumez 3dffc69
Use-after-move of frameInfo in WebPageProxy::decidePolicyForResponseS…
cdumez cf8cfa7
BlobDataTaskClient leaks completed tasks in NetworkSessionCocoa::m_bl…
cdumez 54090eb
Use default member initializers for RenderFrameSet data members
Ahmad-S792 6667782
Add missing return statements in LazyRef.h and LazyUniqueRef.h
cdumez 5960400
clampToInteger<T> does not clamp values below INT_MIN
cdumez 4ead6b9
[Build Speed] REGRESSION (314565@main): Clean build is 30s slower
geoffreygaren 9ff899b
[Win] Fix OpenSSLHelper summary() fallback
iangrunert ed70932
[MSE][iOS] Silent audio under MediaContainmentEnabled when AVStreamDa…
jyavenard b4b1581
[JSC] `String#split` RegExp fast path misses side effects from `ToStr…
sosukesuzuki 012c64c
Remove some dead code from our codebase
cdumez 7c78f81
WebPageProxy::viewScaleFactorDidChange does not update m_viewScaleFactor
cdumez 8d6b112
[JSC] `isDefinitelyNonThenable` Structure cache can go stale when the…
sosukesuzuki 84a71a9
[JSC] Map/Set iteration fast paths should perform `IteratorClose` whe…
sosukesuzuki deb8f86
[JSC] Remove redundant eager length definition in `JSPromiseConstructor`
sosukesuzuki f4b1fca
REGRESSION(314752@main): "Found 1 new test failure: imported/w3c/web-…
gsnedders f93d156
WebPageProxy::flushPending{Mouse,Key}EventCallbacks can corrupt their…
cdumez 58b5768
[WebXR|visionOS] Try shared MTLTexture before falling back to IOSurface
djg 8240c6a
Use default member initializers for SVGTransformDistance data members
Ahmad-S792 e79c024
Fix sandbox style issue in WebProcess sandbox
pvollan 2977b59
[text-wrap: balance] Not applied to content with -webkit-line-clamp: 2
yulunwu2 1e2d071
Use default member initializers for Table Layout data members
Ahmad-S792 2b3b250
Add MediaElementSourceNode tests: creation, channel count, seek, pause
jernoble 31e50e8
[JSC][Temporal] Validate `month` and `eraYear` in Japanese "ce"/"bce"…
sosukesuzuki 626ab77
[AppKit Gestures] WKAppKitGestureController release logging is too noisy
aprotyas b1ca108
Use default member initializers for MathOperator data members
Ahmad-S792 e2c6133
Remove _WKSerializedNode
achristensen07 0a3f97a
Make testRunner.dumpResourceResponseMIMETypes able to work with site …
achristensen07 7901fa5
Use default member initializers for SVGSMILElement data members
Ahmad-S792 6eff33b
WebGL: Crash in EXTDisjointTimerQuery::queryCounterEXT task
kkinnunen-apple 80e617e
REGRESSION: Layout Test webgl/many-contexts.html is a flaky timeout o…
kkinnunen-apple 753ce39
Update ANGLE to 2026-06-05 (1359a25fcf265e4dc4f2f78c381a7b91a3e91d8b)
kkinnunen-apple 7a75b47
[GStreamer] Rework suspending the player when muted and hidden
vivienne-w 648c42f
[GTK] Implement BufferGBM::asNativeImageForTesting
yury-s c18ec1a
[Skia] Move upload conditions handling from SkiaRecordingResult to Sk…
carlosgcampos 7f16a4c
REGRESSION(314788@main) Fix broken build with GCC 12
csaavedra 4f7b193
Improve logging efficiency in GPUProcessConnection::create
pvollan f7025b0
Use a using alias instead of typedef for RenderTable::CollapsedBorder…
Ahmad-S792 44a78ec
Use auto for column position count in FixedTableLayout::layout
Ahmad-S792 0dedbbd
Drop redundant else after return in RenderTable::cellAbove/cellBelow
Ahmad-S792 b29d37c
Use range-based for loops over RenderTable::m_captions
Ahmad-S792 f726d50
Avoid redundant downcast in RenderTable::sectionAbove/sectionBelow
Ahmad-S792 f1013c6
[WebGPU] shader,validation,expression,call,builtin,pow:* is failing
tadeuzagallo 5aba8ad
Avoid redundant width recomputation in FixedTableLayout::calcWidthArray
Ahmad-S792 c3741f6
Use default member initializers for RenderEmbeddedObject data members
Ahmad-S792 b8b7e86
Extract AutoTableLayout::isColumnCollapsed helper
Ahmad-S792 5decddd
[WebGPU] shader,validation,expression,call,builtin,faceForward:* is f…
tadeuzagallo 68104fd
Expand maild render tree depth limit to cover mail app itself
anttijk 6c2c02e
Do not rebuild unnecessary C++ from messages changes
adetaylor 1dbae52
Use default member initializers for RenderLayoutState bitfields
Ahmad-S792 c3a1fc5
Unreviewed, reverting 314811@main.
revert-bot fc7afbc
font-synthesis: Synthetic bold not applied for variable font with fon…
vitorroriz 66ac51e
[WPT] Incorrectly authored test file leads to failure in media-source…
jernoble dd3c171
Remove TrackDefault tests from media-source/ WPT tests
jernoble 71e5e3e
Yosemite Explorer demo on webkit.org
timdream b041edf
[curl] Web Inspector: WebSocket response status code and status text …
dcrousso 3a219a1
[git-webkit] Remove secret scanning setup
JonWBedard aae7663
IDNA cannot fail ASCII domains, even if they start with xn--
annevk 2b529d0
[Site Isolation] Ensure BrowsingContextGroup::sharedProcessForSite do…
szewai a7f8174
REGRESSION(313197@main): [iOS] TestWebKitAPI.IndexedDB.IndexedDBPersi…
martadarbinyan bede953
[Site Isolation] BFCache crash on goBack when cached main frame was R…
basuke d222ffc
AX: LocalFrame is used off the main-thread in accessibility isolated …
twilco 1c2a6d9
[Site Isolation] Implement Page.getResourceTree on the UIProcess Prox…
stwrt 8bbb6a4
Deduplicate the distribution loop in RenderTable::distributeExtraLogi…
Ahmad-S792 8f6bc9a
[JSC] Add DFG MultiGetByVal and MultiPutByVal
Constellation 2259680
[iOS] Quirk Scroll Anchoring off on reddit when the Sink It extension…
smfr ae01d1c
Line break should not appear after U+201D Right Double Quotation Mark
alanbaradlay f149be7
SVG: Do not apply text-decoration on elements with display:contents
Ahmad-S792 b0e6477
Web Inspector: [SI] implement querySelector, querySelectorAll, getOut…
AnujPanta1 0980a39
ANGLE: Metal: webgl/1.0.x/conformance/extensions/webgl-compressed-tex…
kkinnunen-apple 2128a70
WebGL: Remove fast/canvas/webgl/webgl-compressed-texture-astc.html
kkinnunen-apple c202d51
Remove wk1 specific queues from ews-build.webkit
robert-jenner 5431901
Prewarm the fallback tokenizer when requesting text extraction
whsieh ebf0210
Fix style issues in WebProcess sandbox
pvollan df9d73b
IntersectionObserver does not compute intersections for SVG element r…
Ahmad-S792 8d00a41
Fix null pointer dereference in WebPageProxy::updateActivityState
pvollan 2c1df6e
Map nextslide and previousslide MediaSession actions to nexttrack and…
c01c10f
WPT linter fails with error
gsnedders 4dc6d66
[Site Isolation] media-source/mediasource-changetype-play-implicit.ht…
zakariaridouh 2a296bb
Share the percentage distribution loop in AutoTableLayout::calcEffect…
Ahmad-S792 9a889c6
Make Ruthvik Konda a reviewer
ruthvikkonda 7afdf9c
[AppKit Gestures] Fatal error: Attempted to read an unowned reference…
rr-codes 6a4f6ef
[MSE][Cocoa] MediaSampleAVFObjC methods other than divide() failed on…
jyavenard bdffad8
pathFromEllipseElement reads style.rx() and style.ry() without checki…
karlcow c25b26f
CSS corner-shape value square renamed as straight
codedbycupidity 15b6a49
[Gardening]: [iOS] TestWebKitAPI.WritingTools.CompositionWithMultiple…
martadarbinyan 5736e85
[Site Isolation] Fix YouTube crash
bnham 1d48bbc
[AppKit Gestures] WKAppKitGestureController need not re-implement Int…
aprotyas ee04d53
color-mix() with all-absolute color components crashes renderer when …
kmonsen 7a5eeda
[GTK][WPE] Gardening of layout tests
clopez 3f58e20
[JSC] ParenthesesSubpatternFixedCount should support captures
Constellation 77ee6ae
Background Fetch and Cache Storage share a single resolved-path member
cdumez 5fb99ec
Fix unsafe capture of `this` in EventDispatcher::flushMomentumEventLo…
cdumez 2fa8d7a
NetworkStorageManager::persistOrigin() may return true in case of error
cdumez fae960d
LocalStorageManager::cancelConnectToTransientLocalStorageArea cleans …
cdumez fbd2160
SharedWorker's navigator.userAgent ignores per-navigation _customUser…
cdumez e319714
WebSWClientConnection leaks pending callbacks when the network proces…
cdumez 20af97e
WebSWClientConnection::notifyRecordResponseBodyChunk uses a HashMap i…
cdumez 3a9039a
[Site Isolation] Make logs show if site isolation shared process is e…
RupinMittal 8c89e3f
REGRESSION(314648@main):[macOS] Multiple tests are failing in importe…
basuke e63a922
Web Inspector: populate Event Listeners sidebar for cross-origin ifra…
AnujPanta1 c1d25a2
[webkitscmpy] Unit tests should avoid relying on Tracker._tracker's g…
gsnedders 5472527
AX: In rare circumstances, WebKit can loop infinitely downstream of u…
twilco 2455384
REGRESSION(312761@main): http/tests/media/fairplay/fps-mse-unmuxed-m…
jyavenard e6a5efe
[GFC] Add optimized intrinsic-width sizing path
yulunwu2 8dae835
Improve logging efficiency in GPUProcessConnection::didInitialize
pvollan 8394b38
Update touch and gesture tests after 314731@main
aproskuryakov a008f1a
Remove Internals.shouldSkipResourceMonitorThrottling
szewai a0d2eeb
[JSC][Wasm] IPInt memory.atomic.notify/wait and memory.grow mishandle…
sosukesuzuki 013f3f1
Unreviewed, reverting 314863@main (e63a92295a31)
AnujPanta1 b6a9b84
[JSC] Set class field function names at parse time instead of via `Se…
sosukesuzuki 6a73d5e
REGRESSION(311380@main): CRASH in WebCore::LazyLoadVideoObserver::~La…
jernoble 70d5a8f
[CMake] Set SDK based on CMAKE_OSX_SYSROOT and pin compiler tools usi…
emw-apple 212325f
Resync `largest-contentful-paint` from WPT Upstream
smfr 1d30614
Update Kate Lee's status to committer
kate-k-lee 321ad9f
WebSWContextManagerConnection inspector handlers call main-thread-onl…
cdumez 04b65f4
[MathML] Update direction-overall-003.html to match spec-compliant sy…
Ahmad-S792 7cbb35e
Build fix after 314875@main
pascoej 01b1823
[CMake][GTK][WPE] Detect FreeType's builtin WOFF2 support on Skia builds
spenap 0614d0b
git-webkit diff fails in linux
svillar 4eab05f
[GStreamer] Migrate video sink pad probe to PadProbeHandle
philn ac990c0
CloseWatcherManagers inside iframes aren't notified about user activa…
lukewarlow 0c2bbca
[WPE] Add an overview of the WPE Platform API to the documentation
csaavedra e9b9453
Non-unified build fixes for June 10th, 2026
csaavedra 5bc2af8
[WebCodecs] Add support for overriding color space for HW video decoders
youennf df07db5
[Win] Build broken after 314752@main
iangrunert 704d2b6
Fix instances of improper uses of quotes and apostrophes in WebKit
rmondello ccb3efd
Parse and serialize scroll-state container queries
kate-k-lee 252dcd5
alert() deferral logic under SafeBrowsing not properly hooked
francovs c263bec
[GStreamer] Allow access to udmabuf device in bwrap sandbox
philn 3997b5c
REGRESSION(313140@main) Introduced a race condition that permanently …
kmiller68 75c8d8e
[Model] existing tests under LayoutTests/model-element/ tests should …
etiennesegonzac 8e4cc23
[GStreamer] Migrate GLVideoSink to PadProbeHandle
philn 8c5b18b
Remove unnecessary `std::optional` initialization in WebKit
iidmsa a26cc29
Remove unnecessary `std::optional` initialization in WebCore
iidmsa 7aeb5ed
moveBefore() needs to handle selections
lukewarlow a47428d
REGRESSION(314840@main): WPT linter crashes instead of reporting lint…
vitorroriz 3432c64
AX: AXObjectCache::handleAttributeChange never actually handles chang…
twilco 320c6e5
AX: Recent Events table on https://parks.wa.gov is reported as empty …
twilco e922a2c
[JSC] Move RegExp.prototype[Symbol.match] to C++
Constellation 9fd79b3
[Site Isolation] Make key events attribute user interaction to the to…
RupinMittal 7636f61
[JSC][Temporal] Cache ICU UCalendar per CalendarID in CalendarICUBridge
hyjorc1 9cc5fd7
[WebGPU] shader,validation,expression,call,builtin,refract:* is failing
tadeuzagallo d7b4706
getEnclosureList() crashes when a descendant is inside a display:cont…
kmonsen 5318af2
Add quirk on battle.net for login accessing loopback
ce60187
[AppKit Gestures] Storyboards with WKWebView fail to compile (`init(c…
aprotyas 8b40217
[iOS] Occasional UI process crash under PageClientImpl::didCommitLoad…
whsieh 8b4585e
Do not rebuild unnecessary C++ from messages changes [take two]
adetaylor 6df1cac
Find in page sometimes finds the first match twice
colelao 3ac584d
Fix CSP 'self' source matching for opaque-origin documents
roberto-apple 7cf151e
Unreviewed, fix the internal iOS build
whsieh 4b26c3b
Update libwabt.js to support newer WebAssembly features
colelao ddd1bdc
Theater model unloads between 2 seat selections
jeanhbr 8df9152
[Site Isolation] REGRESSION(314640@main): [ iOS Debug ] 32x site-isol…
RupinMittal 08e30f6
PlayStation Port: Build failure in SIMDUTF.cpp due to missing AVX-512…
PardeepYadav1 6db5772
Improve logging efficiency in CachedResource
pvollan abe4593
[Navigation API] Resync Navigation API WPT tests
RupinMittal 9c01a36
[Gardening]: REGRESSION(314640@main): [macOS Debug ] ASSERTION FAILED…
martadarbinyan e67a46f
Enhanced Security sites database should gracefully handle statement f…
a03eea6
[Skia] Use skgpu::Budgeted::kYes for surfaces targeting internal skia…
carlosgcampos 2780830
[Swift GTK] Enable Swift back forward list on GTK by default (take two)
adetaylor ecb5f40
[MathML] Support embellished operator detection through mrow for unde…
Ahmad-S792 5394073
[Site Isolation] Avoid re-searching the document when selecting a fin…
charliewolfe 8452269
REGRESSION(306393@main): SelectFallbackButtonElement should have styl…
annevk cd4bc5c
TransformOperation TextStream uses "scaleX" for ScaleZ
charliewolfe 49d63bf
[MathML] Operators routed through MathOperator are invisible when the…
Ahmad-S792 360d3d3
ColorSpace::XYZ_D65 is logged as "XYZ-D50" in the TextStream operator
charliewolfe 441e3da
[JSC] Remove a misleading comment in Heap::runEndPhase and run delete…
dhecht 6fc2044
Possible null-deref in checkRedirection completion
charliewolfe 78f58a3
createVPCodecParametersString zero-pads bitDepth based on transferCha…
charliewolfe c241847
GraphicsLayerAnimation TextStream dump iterationCount under "delay"
charliewolfe 82ef6d0
Possible null-deref in NetworkProcess::deleteWebsiteDataForOrigin wit…
charliewolfe cedae32
[Gardening]: [macOS Debug ] ASSERTION FAILED: std::holds_alternative<…
martadarbinyan ae2e4a4
SourceBufferPrivate::validateInitializationSegment iterates videoTrac…
charliewolfe 6a12936
Null deref in Image::toShareableBitmap when ShareableBitmap::create()…
charliewolfe 57d0eed
GraphicsContextState::mergeAllChanges records the wrong change flags …
charliewolfe 459c9e9
PlayStation: Main thread assertion fails on PlayStation
Ashusahani a1399ba
ImageOrientation::Orientation TextStream operator swaps top/bottom fo…
charliewolfe 0345af3
border-shape-ignore-radius-computed.html asserts keyword serializatio…
codedbycupidity d343d17
TrackPrivateBase::removeClient has an inverted bounds check
charliewolfe e092063
Skip strokeWidth resolution when no markers and no zero-length caps n…
nullhook 74eb129
Undefined left-shift in AV1 readULEBSize()
charliewolfe 13c2aba
[CMake] Integrate WebKitAdditions as a CMake target
emw-apple fec8c9b
Add Jeffrey Xu to contributors list
jeffreyhxu e7665a9
[libpas] Wrap test_pas with xctest harness
Achierius 3ad8ffd
[Site Isolation] BFCache restore broken for back-navigation through a…
basuke 90b15da
[webkitpy] commits_for_upload should use path_to_module instead of __…
gsnedders ae87bf6
Fix style issues in Networking process sandbox
pvollan 5c716eb
WebModelPlayer should support setting the entityTransform while the m…
etiennesegonzac a3cc416
Have VTTRegion use LoggerHelper
danae404 dfc2007
Changing caption display mode and language simultaneously can cause o…
danae404 94ecf40
[webkitbugspy] Lazily resolve radar authentication
JonWBedard c10af47
Unreviewed, reverting 314897@main (a26cc29546f0)
martadarbinyan 9ce8d06
REGRESSION(307380@main): Possible null pointer dereference in WebPage…
shallawa 6870371
generated-serializers.py should not complain about residual types
mcatanzaro 23b4028
RemoteLayerTreeHost::updateLayerTree may dereference a null root node…
cdumez d3dd450
WebAuthenticatorCoordinatorProxy fails to return after a released Web…
cdumez 870c656
[iOS] WKWebView stuck on a blank/white screen after a quick app-switc…
cdumez cdd711f
REGRESSION(259426@main): [WebAuthn] CcidConnection fails to detect le…
cdumez 38dda74
CtapAuthenticator strands an internal continuation handler when resta…
cdumez 3533e63
NetworkProcessProxy::dataTaskWillPerformHTTPRedirection drops its com…
cdumez f46ff32
Resolve stray `if` in loadSubframe
charliewolfe 758fa8a
[cmake] Make ENABLE_BACK_FORWARD_LIST_SWIFT configurable
basuke 5ab9297
[Site Isolation] Web Inspector: Introduce a CSS agent for the frame t…
the-chenergy da312a7
Follow-up to "[CMake] Integrate WebKitAdditions as a CMake target"
emw-apple ae840bd
WebFrameProxy::nextSibling/previousSibling compare find() against the…
charliewolfe 19f9109
Remove extraneous smart pointer get() calls from StyleSubstitutionRes…
jelee53 cf40e12
Restrict DocumentPrefetcher redirects to same-origin like we do with …
achristensen07 7ad88af
Fix RunningBoard not being able to manage WebKit XPC services on Mac
bnham 5c8b964
NEW-TEST(314615@main): [visionOS Debug] http/tests/security/model-ele…
achristensen07 047a641
Remove unused code in WKPagePrivateMac.mm
achristensen07 07f15d6
TextResourceDecoder's find() skips the last candidate
charliewolfe 52b94b3
Synchronize WPT custom-elements
annevk 10ed2f4
Move to API for grammar checking.
megangardner e46667f
[JSC] Deferred module namespace's `"then"` leaks into `Object.keys`
sosukesuzuki c8e53c7
[JSC] `Heap::clearConcurrentRetainedDataIfPossible()` should not run …
sosukesuzuki fa68546
NavigationAPIMethodTracker should manage its own promise settlement
basuke afdeb7a
Several functions in WebAuthenticatorCoordinator fail to call their c…
cdumez fd62b64
m_scriptTrackingPrivacyDataUpdateObserver is reused for 2 observers
cdumez ace89f6
Avoid some ref-counting churn in OriginStorageManager
cdumez 2a28bec
[Site Isolation] Web Inspector: Implement per-frame CSS functions wit…
the-chenergy 412a823
Prevent re-entrant calls to dispatchPlayPauseEventsIfNeedsQuirks()
szewai 19e18af
[JSC][Temporal] Fix double-throw crash in Temporal constructors; clea…
hyjorc1 221dcc8
[JSC][Temporal] Fix crash in Temporal.PlainMonthDay.from with very la…
hyjorc1 1632df7
StabilityTracer: MobileSafari at Received an invalid message 'WebLock…
RupinMittal f4f624c
CorrectionPanel's autocorrection completion handler captures WebViewI…
cdumez 5c64352
[JSC] `GatherAvailableAncestors` and `AsyncModuleExecutionRejected` c…
sosukesuzuki 42ec79c
Potential use after free of m_controller under ReadableStreamBYOBRequ…
youennf 08713e9
WebGL: UNSIGNED_INT drawElements() does not validate large indexes co…
kkinnunen-apple 24362e6
[JSC] Make wasm name section parsing threadsafe
syg 95df7e6
Merge remote-tracking branch 'upstream/main' into bun/upgrade-to-2436…
sosukesuzuki 10fc0ca
Fix cross-compile breakage from upstream merge
sosukesuzuki 92b221c
FastMalloc: honor extended alignment in class operator new
sosukesuzuki 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
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
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
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
28 changes: 28 additions & 0 deletions
28
JSTests/microbenchmarks/class-fields-anonymous-arrow-function-fields.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,28 @@ | ||
| // Stresses SetFunctionName for anonymous arrow function class fields. | ||
| class ArrowFunctionFields { | ||
| render = (...args) => args; | ||
| setLayout = (l) => l; | ||
| getLayout = () => 0; | ||
| setRenderer = (r) => r; | ||
| header = (n, v) => v; | ||
| status = (s) => s; | ||
| set = (k, v) => v; | ||
| get = (k) => k; | ||
| newResponse = (...a) => a; | ||
| body = (d) => d; | ||
| text = (t) => t; | ||
| json = (o) => o; | ||
| html = (h) => h; | ||
| redirect = (l) => l; | ||
| notFound = () => null; | ||
| } | ||
|
|
||
| function bench(testClass) { | ||
| var instance; | ||
| for (var i = 0; i < 1e5; i++) | ||
| instance = new testClass(); | ||
| return instance; | ||
| } | ||
| noInline(bench); | ||
|
|
||
| bench(ArrowFunctionFields); |
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,58 @@ | ||
| //@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py | ||
| // This benchmarks quantified parentheses whose body can match an empty | ||
| // string, e.g. /(){3}/, /(?:){5}/, /(a?){3}/. The Yarr JIT compiles these | ||
| // patterns and then bails to the interpreter at runtime via the | ||
| // empty-match-detection branch in ParenthesesSubpattern[FixedCount]End. | ||
| // This microbenchmark guards against regressions in either the JIT | ||
| // compilation path or the interpreter fallback for the empty-body case. | ||
|
|
||
| (function() { | ||
| var result = 0; | ||
| var n = 200000; | ||
|
|
||
| var str1 = "abc"; | ||
| var str2 = ""; | ||
| var str3 = "aaa"; | ||
| var str4 = "aaab"; | ||
| var str5 = "xx"; | ||
|
|
||
| // Pure empty body — JIT bails to interpreter on the first iteration. | ||
| var re1 = /(){3}/; // capturing empty | ||
| var re2 = /(?:){3}/; // non-capturing empty | ||
| var re3 = /((?:)){3}/; // capturing of empty alternative | ||
|
|
||
| // Optional / alternation that matches empty for some inputs. | ||
| var re4 = /(a?){3}/; // optional content | ||
| var re5 = /(|x){3}/; // empty alternation | ||
| var re6 = /(x|){3}/; // empty alternation | ||
|
|
||
| // Empty inner inside a non-empty outer. | ||
| var re7 = /(a()){3}/; // outer non-empty, inner empty | ||
|
|
||
| // Empty paren followed by capturing content. | ||
| var re8 = /(){2}(a)b/; | ||
|
|
||
| for (var i = 0; i < n; ++i) { | ||
| if (re1.exec(str1)) | ||
| ++result; | ||
| if (re2.exec(str1)) | ||
| ++result; | ||
| if (re3.exec(str1)) | ||
| ++result; | ||
| if (re4.exec(str2)) | ||
| ++result; | ||
| if (re4.exec(str3)) | ||
| ++result; | ||
| if (re5.exec(str2)) | ||
| ++result; | ||
| if (re6.exec(str5)) | ||
| ++result; | ||
| if (re7.exec(str4)) | ||
| ++result; | ||
| if (re8.exec("ab")) | ||
| ++result; | ||
| } | ||
|
|
||
| if (result != n * 9) | ||
| throw "Error: bad result: " + result; | ||
| })(); |
44 changes: 44 additions & 0 deletions
44
JSTests/microbenchmarks/regexp-fixed-count-capturing-parens.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,44 @@ | ||
| //@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py | ||
| // This benchmarks capturing parentheses with fixed-count quantifiers whose | ||
| // body has a single alternative and contains nothing backtrackable, e.g. | ||
| // /([0-9a-fA-F]){12}/ or /([0-9a-fA-F]{4}\.){2}/. These now route to the | ||
| // ParenthesesSubpatternFixedCount fast path that no longer allocates a | ||
| // ParenContext per iteration. | ||
|
|
||
| (function() { | ||
| var result = 0; | ||
| var n = 500000; | ||
|
|
||
| // Test strings that will match | ||
| var str1 = "0123456789ab"; // for ([0-9a-fA-F]){12} | ||
| var str2 = "abcd.efff.0011"; // for ([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4}) | ||
| var str3 = "aaa"; // for ([a-z]){3} | ||
| var str4 = "abcabc"; // for ([a-z]{3}){2} | ||
|
|
||
| // Test strings that will fail (exercise the abort/backtrack path). | ||
| var fail1 = "0123456789ax"; | ||
| var fail2 = "abcd.efgh.0011"; | ||
|
|
||
| var re1 = /([0-9a-fA-F]){12}/; | ||
| var re2 = /([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})/; | ||
| var re3 = /([a-z]){3}/; | ||
| var re4 = /([a-z]{3}){2}/; | ||
|
|
||
| for (var i = 0; i < n; ++i) { | ||
| if (re1.exec(str1)) | ||
| ++result; | ||
| if (re2.exec(str2)) | ||
| ++result; | ||
| if (re3.exec(str3)) | ||
| ++result; | ||
| if (re4.exec(str4)) | ||
| ++result; | ||
| if (re1.exec(fail1) === null) | ||
| ++result; | ||
| if (re2.exec(fail2) === null) | ||
| ++result; | ||
| } | ||
|
|
||
| if (result != n * 6) | ||
| throw "Error: bad result: " + result; | ||
| })(); |
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 @@ | ||
| function shouldBe(actual, expected) { | ||
| if (JSON.stringify(actual) !== JSON.stringify(expected)) | ||
| throw new Error(`Expected ${JSON.stringify(expected)} but got ${JSON.stringify(actual)}`); | ||
| } | ||
|
|
||
| const str = ("X".repeat(50) + "the_end").repeat(2); | ||
|
|
||
| const re1 = /the_end$/; | ||
| const re2 = /^X{50}the_end$/; | ||
| const re3 = /the_end/g; | ||
|
|
||
| for (let i = 0; i < 1e5; i++) { | ||
| shouldBe(re1[Symbol.match](str)[0], "the_end"); | ||
| shouldBe(re2[Symbol.match](str), null); | ||
| shouldBe(re3[Symbol.match](str), ["the_end", "the_end"]); | ||
| shouldBe(str.match(re1)[0], "the_end"); | ||
| shouldBe(str.match(re2), null); | ||
| shouldBe(str.match(re3), ["the_end", "the_end"]); | ||
| } |
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,17 @@ | ||
| function shouldBe(a, b) { | ||
| if (JSON.stringify(a) !== JSON.stringify(b)) | ||
| throw new Error(`Expected ${JSON.stringify(b)} but got ${JSON.stringify(a)}`); | ||
| } | ||
|
|
||
| const str = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzfoo"; | ||
| const re1 = /foo/; | ||
| const re2 = /bar/; | ||
| const re3 = /[a-z]/g; | ||
| for (let i = 0; i < 1e4; i++) { | ||
| shouldBe(re1[Symbol.match](str)[0], "foo"); | ||
| shouldBe(re2[Symbol.match](str), null); | ||
| shouldBe(re3[Symbol.match](str).length, 81); | ||
| shouldBe(str.match(re1)[0], "foo"); | ||
| shouldBe(str.match(re2), null); | ||
| shouldBe(str.match(re3).length, 81); | ||
| } |
19 changes: 19 additions & 0 deletions
19
JSTests/microbenchmarks/regexp-prototype-match-complex-pattern.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 @@ | ||
| function shouldBe(actual, expected) { | ||
| if (JSON.stringify(actual) !== JSON.stringify(expected)) | ||
| throw new Error(`Expected ${JSON.stringify(expected)} but got ${JSON.stringify(actual)}`); | ||
| } | ||
|
|
||
| const str = "abc123XYZ_foo_bar_baz_987654321".repeat(2); | ||
|
|
||
| const re1 = /abc\d+XYZ_foo_bar_baz_\d+/; | ||
| const re2 = /abc\d+(?=XXX)(?:_foo_)(?:bar_)(?:baz_)\d+/; | ||
| const re3 = /\d+/g; | ||
|
|
||
| for (let i = 0; i < 1e4; i++) { | ||
| shouldBe(re1[Symbol.match](str)[0], "abc123XYZ_foo_bar_baz_987654321"); | ||
| shouldBe(re2[Symbol.match](str), null); | ||
| shouldBe(re3[Symbol.match](str), ["123", "987654321", "123", "987654321"]); | ||
| shouldBe(str.match(re1)[0], "abc123XYZ_foo_bar_baz_987654321"); | ||
| shouldBe(str.match(re2), null); | ||
| shouldBe(str.match(re3), ["123", "987654321", "123", "987654321"]); | ||
| } |
9 changes: 9 additions & 0 deletions
9
JSTests/microbenchmarks/regexp-prototype-match-no-strength-reduction.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,9 @@ | ||
| function shouldBe(a, b) { | ||
| if (JSON.stringify(a) !== JSON.stringify(b)) | ||
| throw new Error(`Expected ${JSON.stringify(b)} but got ${JSON.stringify(a)}`); | ||
| } | ||
|
|
||
| for (let i = 0; i < 1e5; i++) { | ||
| shouldBe(new RegExp("wor" + "ld")[Symbol.match]("hello world")[0], "world"); | ||
| shouldBe(/hello/[Symbol.match]("hello" + "world" + Math.random())[0], "hello"); | ||
| } | ||
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.
Remove
Math.random()from the benchmark hot path.Using RNG each iteration introduces unrelated and nondeterministic overhead, which can skew the
RegExp.prototype[Symbol.match]measurement.Proposed change
for (let i = 0; i < 1e5; i++) { shouldBe(new RegExp("wor" + "ld")[Symbol.match]("hello world")[0], "world"); - shouldBe(/hello/[Symbol.match]("hello" + "world" + Math.random())[0], "hello"); + const input = "hello" + "world" + (i & 1); + shouldBe(/hello/[Symbol.match](input)[0], "hello"); }📝 Committable suggestion
🤖 Prompt for AI Agents