Commit Graph

9482 Commits

Author SHA1 Message Date
serge-sans-paille
bf3516e81e Bug 1964489 - Avoid duplication in NS_DECLARE_STATIC_IID_ACCESSOR / NS_DEFINE_STATIC_IID_ACCESSOR r=nika,necko-reviewers,media-playback-reviewers,places-reviewers,win-reviewers,dom-storage-reviewers,xpcom-reviewers,gstoll,janv,emilio,padenot,valentin,asuth
In modern C++, static constexpr member variables are automatically
inline (aka weak) so the template trick is not needed. This also avoid
duplication and reduces the amount of parsed code. No impact on
generated binary (actually: smaller debuginfo, close to identical
binary).

Differential Revision: https://phabricator.services.mozilla.com/D247825
2025-05-08 08:05:51 +00:00
yossydev
632aef05a3 Bug 1911623 - Remove JS_SetParallelParsingEnabled and JSRuntime::parallelParsingEnabled_; r=arai
Differential Revision: https://phabricator.services.mozilla.com/D247701
2025-05-05 12:46:57 +00:00
Matthew Gaudet
ead248f08f Bug 1963444 - Remove DESERIALIZE_BYTES r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D247204
2025-05-05 04:17:19 +00:00
Olli Pettay
5be8731e9a Bug 1960461 - Merge PromiseJobRunnable and PromiseJobCallback and recycle one instance when possible, and trace microtasks explicitly. Remove useless CheckForInterrupt() call, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D245760
2025-04-28 12:30:29 +00:00
Nicolò Ribaudo
0c1633f33f Bug 1950211 - Add telemetry for String methods calling RegExp symbols on primitives r=dminor,iain
This patch adds telemetry for https://github.com/tc39/ecma262/pull/3009.

That normative PR has already been approved by TC39, but we need to
verify that it's web compatible.

Differential Revision: https://phabricator.services.mozilla.com/D241305
2025-04-24 17:35:55 +00:00
Andrew McCreight
68046e6cc3 Bug 1958292 - Don't use the observer service for forget skippable cleanup. r=smaug
It appears that calling UnmarkGrayStrongObservers while inside an observer can
cause crashes. This will only happen for the forget skippable cleanup, so this
patch splits out a separate cleanup method, adds a new static variable to hold
a pointer to the marker static instance, and adds a new static method to call
the cleanup method on the static instance.

There are no other uses of cycle-collector-forget-skippable so I get rid of it.

Differential Revision: https://phabricator.services.mozilla.com/D246437
2025-04-23 20:24:50 +00:00
Goloman Adrian
008ad51054 Backed out 2 changesets (bug 1960461) for causing wpt failures.
Backed out changeset 9e19abedef4c (bug 1960461)
Backed out changeset 9b7145eb7141 (bug 1960461)
2025-04-23 11:48:21 +03:00
Olli Pettay
9233e476b8 Bug 1960461 - Merge PromiseJobRunnable and PromiseJobCallback and recycle one instance when possible, and trace microtasks explicitly. Remove useless CheckForInterrupt() call, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D245760
2025-04-22 23:37:35 +00:00
Gabriele Svelto
08a8136801 Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

The crash helper process is started when the first exception handler is set
on desktop platforms and before loading libxul on Android. In both cases
starting this process happens asynchronously so that neither the main process
nor child processes have to wait for it to come up. If a crash happens before
the crash helper has started, the crashed process will wait for it to fully
come up and then proceed with regular crash generation.

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-04-18 16:37:06 +00:00
Denis Palmeiro
fb96bb5b8b Bug 1959460: Migrate SLOW_TASK and SLOW_PHASE metrics to glean labeled counters. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D245605
2025-04-17 17:54:12 +00:00
André Bargull
19db4a67ea Bug 1960889: Expose Temporal as a new global property. r=dminor,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D245728
2025-04-16 13:50:18 +00:00
Joel Maher
98ece24bd5 Bug 1959821 - cleanup and standardize remaining xpcshell.toml files. r=aryx,sync-reviewers,markh
Differential Revision: https://phabricator.services.mozilla.com/D245147
2025-04-15 20:24:35 +00:00
Tom Schuster
42a2623856 Bug 1960547 - Load subscript from resource: URL in test_envChain_subscript.js. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D245539
2025-04-15 13:16:09 +00:00
Alex Hochheiden
9e91a1f021 Bug 1715287 - [lint] Enable remaining pyupgrade rules and lint tree r=linter-reviewers,webdriver-reviewers,translations-reviewers,whimboo,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D245320
2025-04-13 17:48:23 +00:00
Alex Hochheiden
c1e140fe43 Bug 1715287 - [lint] Fix pyupgrade lint errors from new configuration r=linter-reviewers,webdriver-reviewers,taskgraph-reviewers,ahal,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D245269
2025-04-13 17:48:23 +00:00
Nika Layzell
9a16cc7809 Bug 1956103 - Part 6: Migrate ScriptPreloader off of MonitorSingleWriter, r=arai
It appears that the only use of this being a MonitorSingleWriter is to avoid
holding `mSaveMonitor` to read `mCacheInvalidated` when starting a new content
process. So it seems somewhat likely that this could be simplified further,
removing the need for the special capabaility entirely.

Differential Revision: https://phabricator.services.mozilla.com/D242850
2025-04-11 19:42:02 +00:00
Florian Quèze
4bc72da22a Bug 1956726 - remove the now unused variants of the Telemetry::Accumulate API, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D244354
2025-04-08 14:21:03 +00:00
Florian Quèze
9885783942 Bug 1956726 - remove leftover Telemetry.h includes in .cpp files, r=chutten,geckoview-reviewers,cookie-reviewers,win-reviewers,dom-storage-reviewers,gstoll,valentin,m_kato,janv.
Differential Revision: https://phabricator.services.mozilla.com/D244351
2025-04-08 13:03:02 +00:00
Florian Quèze
0e36d8cc90 Bug 1956726 - Migrate histograms to use Glean APIs in js/xpconnect/, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D244179
2025-04-03 21:02:55 +00:00
zombie
603e1491a2 Bug 1958019 - Fix @see JSDoc references in XPCOMUtils.sys.mjs r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D244371
2025-04-03 16:10:45 +00:00
zombie
499cbc99aa Bug 1945464 - Design type-friendly XPCOM.declareLazy() r=Standard8,arai,mossop
Prototype of a type-friendly design for handling all of the different
kinds of lazy imports and getters.

Differential Revision: https://phabricator.services.mozilla.com/D238131
2025-04-02 13:44:48 +00:00
Joel Maher
34dc8fc793 Bug 1957450 - cleanup chrome.toml files to remove old conditions and standardize remaining conditions. r=aryx,devtools-reviewers,fxview-reviewers,profiler-reviewers,omc-reviewers,migration-reviewers,backup-reviewers,julienw,nchevobbe,mconley,pdahiya,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D243709
2025-04-01 21:16:45 +00:00
Norisz Fay
b263c6627a Backed out 9 changesets (bug 1620998) for causing multiple crash related failures
Backed out changeset 274ab6fba51b (bug 1620998)
Backed out changeset 731b7a72161e (bug 1620998)
Backed out changeset 5dad868cb181 (bug 1620998)
Backed out changeset 49618d90e1da (bug 1620998)
Backed out changeset cc14d8374efa (bug 1620998)
Backed out changeset 31f3cc43e800 (bug 1620998)
Backed out changeset fde49d4de714 (bug 1620998)
Backed out changeset 857c23185317 (bug 1620998)
Backed out changeset 97f0f061357e (bug 1620998)
2025-04-02 02:23:33 +03:00
Gabriele Svelto
6259c76b43 Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

The crash helper process is started when the first exception handler is set
on desktop platforms and before loading libxul on Android. In both cases
starting this process happens asynchronously so that neither the main process
nor child processes have to wait for it to come up. If a crash happens before
the crash helper has started, the crashed process will wait for it to fully
come up and then proceed with regular crash generation.

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-04-01 15:13:42 +00:00
Tooru Fujisawa
ed517a4cdf Bug 1956289 - Reject importing system modules from untrusted schemes. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D243307
2025-04-01 03:10:08 +00:00
Cosmin Sabou
e3d0bc89ab Backed out 9 changesets (bug 1620998) for causing build bustages. CLOSED TREE
Backed out changeset 72781375abd5 (bug 1620998)
Backed out changeset 30edb461ed99 (bug 1620998)
Backed out changeset a027ff2de570 (bug 1620998)
Backed out changeset 821e4224085a (bug 1620998)
Backed out changeset e90f6557d883 (bug 1620998)
Backed out changeset 47e7a1a2796e (bug 1620998)
Backed out changeset dbf8543d39d4 (bug 1620998)
Backed out changeset e72d5596ac91 (bug 1620998)
Backed out changeset b351cb3d0b54 (bug 1620998)
2025-04-01 01:34:43 +03:00
Gabriele Svelto
c544442459 Bug 1620998 - Out-of-process crash generation for child processes r=afranchuk,geckoview-reviewers,glandium,browser-installer-reviewers,nalexander,owlish
This implements the crash helper service used to move child process crash
report generation out of the main process and into its own process. This is
implemented as a separate executable that is launched on startup by the main
process on the desktop platforms and as a service hosted by a separate process
on Android.

The crash helper process is started when the first exception handler is set
on desktop platforms and before loading libxul on Android. In both cases
starting this process happens asynchronously so that neither the main process
nor child processes have to wait for it to come up. If a crash happens before
the crash helper has started, the crashed process will wait for it to fully
come up and then proceed with regular crash generation.

IPC with the crash helper is implemented using Unix sockets on Linux and macOS
with the former using sequential packets and the latter using stream sockets.
On Windows we use named pipes. In all cases the choice of IPC was dictated both
by the requirement to eventually talk directly to child processes from within
the sandbox, and to external processes in case of Windows as the Windows
Error Reporting exception handler must be able to reach out to the helper from
within a restricted context. These particular requirements are not used yet but
will be as we move more logic out of the main process logic.

Differential Revision: https://phabricator.services.mozilla.com/D231083
2025-03-31 21:23:14 +00:00
abatef
503fdead8d Bug 1951723 - Add Formatted Logging to JS Logging. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D241743
2025-03-25 20:35:22 +00:00
Tooru Fujisawa
2383b98374 Bug 1954644 - Part 3: Cleanup ModuleLoadRequest parameters to avoid confusing parameter syntax. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D242308
2025-03-22 04:03:54 +00:00
Florian Quèze
55c6fd3ae2 Bug 1950417 - Migrate memory histograms to Glean, making them also available for Firefox Android, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D242035
2025-03-20 19:54:58 +00:00
Jan de Mooij
a1009eb9da Bug 1953503 part 6 - Add use counter for PromiseLookup fuse. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D241391
2025-03-14 11:23:10 +00:00
Nicolas Chevobbe
e1efbae727 Bug 1935431 - Expose TrustedHTML, TrustedScript and TrustedScriptURL in DevTools sandbox. r=devtools-reviewers,smaug.
This is needed to add meaningful previews for instances of those classes in
the console.
Tests are added in next patch.

Differential Revision: https://phabricator.services.mozilla.com/D241357
2025-03-13 15:11:43 +00:00
Travis Long
51dd1574c7 Bug 1947604 - Part 6: Glam Experiment temporary metric instrumentation (js module). r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D241255
2025-03-13 13:17:27 +00:00
Alex Franchuk
b866d4a7b2 Bug 1951925 - Fix base content memory usage regressions r=nika
This disarms a footgun in the FreezableMapping::Freeze API, which was
causing read-only mappings in the global stylesheet cache to fail. These
failures caused content processes to re-load the style sheets,
increasing memory usage.

Differential Revision: https://phabricator.services.mozilla.com/D240928
2025-03-12 13:44:00 +00:00
Tooru Fujisawa
4626ed8a4b Bug 1941472 - Stop setting JS::TransitiveCompileOptions.deoptimizeModuleGlobalVars. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D233725
2025-03-12 10:27:09 +00:00
Goloman Adrian
3bf4bdf4df Backed out changeset dca810679260 (bug 1951925) for causing build bustages @TestSharedMemory.cpp. CLOSED TREE 2025-03-12 05:55:09 +02:00
Alex Franchuk
ec8529652d Bug 1951925 - Fix base content memory usage regressions r=nika
This disarms a footgun in the FreezableMapping::Freeze API, which was
causing read-only mappings in the global stylesheet cache to fail. These
failures caused content processes to re-load the style sheets,
increasing memory usage.

Differential Revision: https://phabricator.services.mozilla.com/D240928
2025-03-12 03:17:49 +00:00
Fatih Kilic
37486aeb74 Bug 1945540: Part 3 - Get integrity from import map. r=tschuster,jonco,dom-core,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D236559
2025-03-06 14:16:30 +00:00
Butkovits Atila
bfb163333f Backed out 2 changesets (bug 1938859, bug 1941472) for causing high frequency failures at browser_bannerClicking.js.
Backed out changeset 9a3a01f76cb5 (bug 1938859)
Backed out changeset 352cc7cae254 (bug 1941472)
2025-03-06 17:40:20 +02:00
Tooru Fujisawa
800e70f205 Bug 1941472 - Stop setting JS::TransitiveCompileOptions.deoptimizeModuleGlobalVars. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D233725
2025-03-06 02:53:23 +00:00
Alexandru Marc
a38ff5f3a4 Backed out changeset c46147974f79 (bug 1940342) for causing btime failures CLOSED TREE 2025-03-05 06:22:39 +02:00
Steve Fink
1791817909 Bug 1940342 - Reserve slots for conditional proto keys for EXPLICIT_RESOURCE_MANAGEMENT r=spidermonkey-reviewers,iain
Differential Revision: https://phabricator.services.mozilla.com/D233453
2025-03-05 00:41:54 +00:00
Olli Pettay
d7a53d92bc Bug 1951772 - Disable Mutation Events in Nightly, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D240375
2025-03-04 22:54:05 +00:00
Alex Franchuk
da658fa4b2 Bug 1942129 pt4 - Convert old shmem call sites to use the new shmem classes r=ipc-reviewers,media-playback-reviewers,padenot,lsalzman,aosmond,nika
While much of this is simply converting code (and removing extraneous
`size` parameters), toolkit/xre/GeckoArgs.{h,cpp} has some significant
changes to support sending read-only handles (which is all we need!).

Differential Revision: https://phabricator.services.mozilla.com/D236750
2025-03-04 22:11:12 +00:00
Butkovits Atila
2406ce261c Backed out 8 changesets (bug 1942129) for causing bustages at SharedMemoryMapping.h. CLOSED TREE
Backed out changeset 8d9053f1c203 (bug 1942129)
Backed out changeset 393e3c507c27 (bug 1942129)
Backed out changeset 8240d353d224 (bug 1942129)
Backed out changeset 8c4cd026b720 (bug 1942129)
Backed out changeset 742634b0d6e9 (bug 1942129)
Backed out changeset d16857f9812f (bug 1942129)
Backed out changeset 7ff7af041ee7 (bug 1942129)
Backed out changeset ef41d9e4c7de (bug 1942129)
2025-03-04 00:43:23 +02:00
Alex Franchuk
f7ee08eef3 Bug 1942129 pt4 - Convert old shmem call sites to use the new shmem classes r=ipc-reviewers,media-playback-reviewers,padenot,lsalzman,aosmond,nika
While much of this is simply converting code (and removing extraneous
`size` parameters), toolkit/xre/GeckoArgs.{h,cpp} has some significant
changes to support sending read-only handles (which is all we need!).

Differential Revision: https://phabricator.services.mozilla.com/D236750
2025-03-03 19:53:20 +00:00
Matthew Gaudet
6b3599001c Bug 1946138 - Add telemetry for thenables where the holder object is Object.prototype r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D239791
2025-03-03 17:18:05 +00:00
Matthew Gaudet
eec478b8cd Bug 1950508 - Ship Error.captureStackTrace r=dminor,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D239669
2025-03-03 15:48:35 +00:00
Dave Townsend
941f1ac3b3 Bug 1945566 - Add a moz-src protocol handler, r=necko-reviewers,firefox-desktop-core-reviewers ,extension-reviewers,robwu,mconley,valentin,tschuster
Differential Revision: https://phabricator.services.mozilla.com/D236569
2025-03-03 12:47:46 +00:00
Jan de Mooij
0fc7a537c6 Bug 1950087 part 8 - Add use counter for array-species fuse. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D239710
2025-03-03 12:06:34 +00:00