Commit Graph

485 Commits

Author SHA1 Message Date
Sylvestre Ledru
8ae54ea4f9 Bug 1519636 - Reformat recent changes to the Google coding style r=geckoview-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,nalexander,gstoll,tcampbell,janv,julienw
Updated with clang-format version 19.1.7 (taskcluster-DYvBxDZJRVqTi8E7pTSJAQ)

Differential Revision: https://phabricator.services.mozilla.com/D249880
2025-05-17 19:11:13 +00:00
Fatih Kilic
7a79929fc1 Bug 1727775 - Spoof the user agent if RFP target is enabled. r=tjr,geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D240636
2025-05-02 12:17:03 +00:00
Alexandre Poirot
48541ca810 Bug 1940287 - [devtools] Make callFunctionAndLogException re-throw the original exception. r=mccr8
Moving this existing helper from Console (idl) to ChromeUtils (WebIdl)
in order to be able to use aRv.MightThrowJSException and aRv.ThrowJSException
which are key ingredients to be able to re-throw the intercepted exception.

Differential Revision: https://phabricator.services.mozilla.com/D233548
2025-04-29 07:44:28 +00:00
Nicolas Chevobbe
a67d53e1f9 Bug 1961744 - [devtools] Add ChromeUtils.isJSIdentifier . r=arai
Differential Revision: https://phabricator.services.mozilla.com/D246178
2025-04-23 07:30:52 +00:00
Tom Schuster
65c0284e3c Bug 1920348 - ChromeUtil for creating a nsIContentSecurityPolicy from a header string. r=simonf
Differential Revision: https://phabricator.services.mozilla.com/D245543
2025-04-22 11:48:06 +00:00
Fatih Kilic
c4aa41ea0c Bug 1957553 - Reset intl.accept_languages when JSLocalePrompt target is active regardless of RFP pref (and also clean up some hardcoded en-US values). r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D244393
2025-04-11 21:40:04 +00:00
Paul Adenot
9b626ebb36 Bug 1959470 - Add a way to send Fenix to the background from Chrome JS, for testing. r=calu,geckoview-reviewers,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D244943
2025-04-10 16:45:10 +00:00
Tooru Fujisawa
8fa3cc1097 Bug 1947158 - Add url option to ChromeUtils.clearResourceCache. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D238357
2025-03-18 09:57:57 +00:00
Tooru Fujisawa
fbcbb423f8 Bug 1948875 - Part 4: Remove ChromeUtils.clearStyleSheetCache* and ChromeUtils.clearScriptCache*. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D239141
2025-03-18 02:03:32 +00:00
Tooru Fujisawa
126a60efe9 Bug 1948875 - Part 2: Make ChromeUtils.clearResourceCache receive options. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D239139
2025-03-18 02:03:31 +00:00
Tooru Fujisawa
893c87646e Bug 1948875 - Part 1: Add static imgLoader::ClearCache and refactor IPC. r=tnikkel
In order to clear cache from ChromeUtils.clearResourceCache with variuos
filtering, imgLoader needs a method that are adaptive to the current process,
where in the parent process, clear all processes' cache,
and in the content process, clear the cache in the process.

Refactored the cache methods based on single static method and single IPC
method, this is also necessary to extend the ChromeUtils.clearResourceCache in
bug 1947158.

Differential Revision: https://phabricator.services.mozilla.com/D239138
2025-03-18 02:03:31 +00:00
Tooru Fujisawa
ec6d097b60 Bug 1948808 - Part 3: Add ChromeUtils.clearResourceCache. r=emilio,tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D238582
2025-02-20 10:16:47 +00:00
Tooru Fujisawa
a3f1629b8f Bug 1948808 - Part 2: Add chrome optional parameter to control the target of clear in-memory cache. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D238581
2025-02-20 10:16:46 +00:00
Sandor Molnar
61d8ddba5a Backed out 5 changesets (bug 1948814, bug 1948808) for causing build bustages @ gfxWindowsPlatform.cpp & imgLoader.cpp CLOSED TREE
Backed out changeset 9dad8866deac (bug 1948808)
Backed out changeset 7d15850e1871 (bug 1948808)
Backed out changeset 94a8ed4703ac (bug 1948808)
Backed out changeset 1249b7246565 (bug 1948814)
Backed out changeset 67a316ead440 (bug 1948814)
2025-02-20 10:19:27 +02:00
Tooru Fujisawa
1543b4f46b Bug 1948808 - Part 3: Add ChromeUtils.clearResourceCache. r=emilio,tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D238582
2025-02-20 07:04:55 +00:00
Tooru Fujisawa
6cb4f15fea Bug 1948808 - Part 2: Add chrome optional parameter to control the target of clear in-memory cache. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D238581
2025-02-20 07:04:55 +00:00
Nika Layzell
093a9255aa Bug 1944345 - Throw from (un)register(Window|Process)Actor in wrong process, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D236283
2025-02-10 19:55:09 +00:00
Nika Layzell
d749c1f081 Bug 1942128 - Part 1: Add a mechanism to allow Chrome JS to manage headless content processes, r=smaug
This adds a new XPCOM type which will hold the
`UniqueContentParentKeepAlive` internally, and can be returned into
Chrome JS using a new method on ChromeUtils.sys.mjs.

The KeepAlive will be cleaned up when the cycle-collected JS object is
destroyed, or when the `invalidateKeepAlive()` method is called on the
object (for times when JS wants to take more direct control over the
lifecycle of the KeepAlive).

In the future it would be possible to add methods to e.g. get a
KeepAlive for a specific existing process, or clone a KeepAlive object,
however that is not required for the initial use-case.

This will be used in part 2 to replace the use of hidden iframes with
dummy pages to create the "inference" content process.

Differential Revision: https://phabricator.services.mozilla.com/D234906
2025-02-07 20:32:03 +00:00
Stanca Serban
ab72c7771f Backed out 2 changesets (bug 1942128) for causing ES lint failures.
Backed out changeset ea6eaed0c682 (bug 1942128)
Backed out changeset 0305ed873ca2 (bug 1942128)
2025-02-07 04:13:15 +02:00
Nika Layzell
6b2dfb6b15 Bug 1942128 - Part 1: Add a mechanism to allow Chrome JS to manage headless content processes, r=smaug
This adds a new XPCOM type which will hold the
`UniqueContentParentKeepAlive` internally, and can be returned into
Chrome JS using a new method on ChromeUtils.sys.mjs.

The KeepAlive will be cleaned up when the cycle-collected JS object is
destroyed, or when the `invalidateKeepAlive()` method is called on the
object (for times when JS wants to take more direct control over the
lifecycle of the KeepAlive).

In the future it would be possible to add methods to e.g. get a
KeepAlive for a specific existing process, or clone a KeepAlive object,
however that is not required for the initial use-case.

This will be used in part 2 to replace the use of hidden iframes with
dummy pages to create the "inference" content process.

Differential Revision: https://phabricator.services.mozilla.com/D234906
2025-02-07 00:28:47 +00:00
Tom Schuster
cfeedc189a Bug 1944241 - Remove the browser.xhtml specific CSP violation telemetry. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D236527
2025-02-04 12:54:28 +00:00
Fatih Kilic
2d1654201c Bug 1945142: Backout D234215. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D236356
2025-02-01 01:40:20 +00:00
Fatih Kilic
73f4f01465 Bug 1939881: Implement RFPTargetBits and replace appropriate uses. r=tjr
This is a huge patch, but it is only really refactoring of RFPTarget enum. We used to use RFPTarget as a bitset and now we ran out of bits, so now we need a workaround.

Differential Revision: https://phabricator.services.mozilla.com/D233182
2025-01-23 14:49:44 +00:00
Tooru Fujisawa
8084bcd8ca Bug 1881888 - Part 10: Remove ChromeUtils.import. r=Standard8,mccr8,profiler-reviewers,omc-reviewers,home-newtab-reviewers,julienw,mconley,pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D233722
2025-01-23 05:21:58 +00:00
Tooru Fujisawa
ac7fdd6102 Bug 1881888 - Part 9: Remove ChromeUtils.defineModuleGetter. r=Standard8,mccr8,profiler-reviewers,omc-reviewers,home-newtab-reviewers,julienw,mconley,pdahiya
Differential Revision: https://phabricator.services.mozilla.com/D233721
2025-01-23 05:21:58 +00:00
Cristian Tuns
6d135d7efe Backed out 5 changesets (bug 1940797, bug 1940800, bug 1940819, bug 1939881, bug 1939903) for causing build bustages in ContentChild.cpp CLOSED TREE
Backed out changeset f632ead9f4bd (bug 1939903)
Backed out changeset 30e9f5c7c5b7 (bug 1940800)
Backed out changeset 7ce4c97719aa (bug 1940797)
Backed out changeset f994cb8875ff (bug 1939881)
Backed out changeset ac7780c78455 (bug 1940819)
2025-01-22 19:42:49 -05:00
Fatih Kilic
a0beaee8e2 Bug 1939881: Implement RFPTargetBits and replace appropriate uses. r=tjr
This is a huge patch, but it is only really refactoring of RFPTarget enum. We used to use RFPTarget as a bitset and now we ran out of bits, so now we need a workaround.

Differential Revision: https://phabricator.services.mozilla.com/D233182
2025-01-22 23:46:31 +00:00
Fatih Kilic
d34b40b7f5 Bug 1941091: Fix broken tests. r=tjr
The reason we introduce aSkipChromePrincipalCheck to nsRFPService::IsRFPEnabledFor function is because of ChromeUtils.shouldResistFingerprint function. ChromeUtils uses system principal, causing IsJSContextCurrentlyChromePrivileged() to return true no matter what the document is. In case of ChromeUtils.shouldResistFingerprint we are not interested in JS context's principal, we are only interested in the document.

Differential Revision: https://phabricator.services.mozilla.com/D234215
2025-01-22 17:57:22 +00:00
Fatih Kilic
69ae66ee64 Bug 1448423: Allow passing IsPBM to ChromeUtils::ShouldResistFingerprinting. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D226828
2025-01-16 13:35:45 +00:00
Alexandru Marc
5a4a4de260 Backed out 2 changesets (bug 1448423) for causing bc failures @ browser_startup.js
Backed out changeset 93e49e407bc1 (bug 1448423)
Backed out changeset ac0d0fe55391 (bug 1448423)
2025-01-15 23:14:01 +02:00
Fatih Kilic
b021a1a326 Bug 1448423: Allow passing IsPBM to ChromeUtils::ShouldResistFingerprinting. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D226828
2025-01-15 18:17:53 +00:00
Tom Schuster
4f2b7226c3 Bug 1937080 - Block inline event handlers in Nightly and collect telemetry. r=freddyb,Gijs,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D232982
2025-01-08 07:52:15 +00:00
Benjamin Beurdouche
8da15edad3 Bug 1900537 - Part 4: Extend ClearDataService to handle MLS state. r=emilio,emz
Clear MLS state when clearing cookies and site data.
Implement the BySite function for when these can be cleared on a per pattern (/container) basis.

Differential Revision: https://phabricator.services.mozilla.com/D226256
2024-12-18 14:04:20 +00:00
Sandor Molnar
6b61a5aad4 Backed out 4 changesets (bug 1900537, bug 1883321) for causing build bustages. CLOSED TREE
Backed out changeset 560116c848c7 (bug 1900537)
Backed out changeset 519f2beaa972 (bug 1900537)
Backed out changeset be1b3bcbf647 (bug 1883321)
Backed out changeset fb2f38746d3f (bug 1883321)
2024-12-18 14:43:51 +02:00
Benjamin Beurdouche
8d734eb2ae Bug 1900537 - Part 4: Extend ClearDataService to handle MLS state. r=emilio,emz
Clear MLS state when clearing cookies and site data.
Implement the BySite function for when these can be cleared on a per pattern (/container) basis.

Differential Revision: https://phabricator.services.mozilla.com/D226256
2024-12-18 12:06:53 +00:00
Sandor Molnar
ce80797adc Backed out 4 changesets (bug 1883321, bug 1900537) for causing build bustages. CLOSED TREE
Backed out changeset 3d59c5411aa5 (bug 1900537)
Backed out changeset 54ff63eb9703 (bug 1900537)
Backed out changeset a6bddc58d43f (bug 1883321)
Backed out changeset 7e51eb2e066b (bug 1883321)
2024-12-18 13:49:19 +02:00
Benjamin Beurdouche
b1b6a5ef47 Bug 1900537 - Part 4: Extend ClearDataService to handle MLS state. r=emilio,emz
Clear MLS state when clearing cookies and site data.
Implement the BySite function for when these can be cleared on a per pattern (/container) basis.

Differential Revision: https://phabricator.services.mozilla.com/D226256
2024-12-18 10:07:43 +00:00
Norisz Fay
19bdbcffd4 Backed out 4 changesets (bug 1883321, bug 1900537) for causing bustages on Cargo.lock
Backed out changeset 7085f64159d1 (bug 1900537)
Backed out changeset b9db0177b920 (bug 1900537)
Backed out changeset b027ce53bfee (bug 1883321)
Backed out changeset b26c29557d77 (bug 1883321)
2024-12-17 22:01:52 +02:00
Benjamin Beurdouche
6339566465 Bug 1900537 - Part 4: Extend ClearDataService to handle MLS state. r=emilio,emz
Clear MLS state when clearing cookies and site data.
Implement the BySite function for when these can be cleared on a per pattern (/container) basis.

Differential Revision: https://phabricator.services.mozilla.com/D226256
2024-12-17 18:45:28 +00:00
Goloman Adrian
813cf9e0cb Backed out 4 changesets (bug 1883321, bug 1900537) for causing multiple failures. CLOSED TREE
Backed out changeset 7b1ab2c1bfb6 (bug 1900537)
Backed out changeset 1306fe3ef6d3 (bug 1900537)
Backed out changeset e83b4e090bc0 (bug 1883321)
Backed out changeset b9e50942a0cd (bug 1883321)
2024-12-07 02:50:49 +02:00
Benjamin Beurdouche
120020376a Bug 1900537 - Part 4: Extend ClearDataService to handle MLS state. r=emilio,pbz
Clear MLS state when clearing cookies and site data.
Implement the BySite function for when these can be cleared on a per pattern (/container) basis.

Differential Revision: https://phabricator.services.mozilla.com/D226256
2024-12-06 20:50:43 +00:00
Benjamin VanderSloot
e09c25681d Bug 1873418 - Support Partitioned cookie attribute for browser extensions - r=robwu,anti-tracking-reviewers,webdriver-reviewers,timhuang,Sasha
The part that is covered here is extending the partitionKey attribute, as in the proposal of aselya here:

https://github.com/w3c/webextensions/pull/581/files

Notably not included is adding the new Cookies.GetPartitionKey function.

Differential Revision: https://phabricator.services.mozilla.com/D219990
2024-09-26 05:36:00 +00:00
Butkovits Atila
0403ca7be9 Backed out changeset b8b6e3f85b20 (bug 1873418) for causing failures at test_getPartitionKeyFromURL.js. CLOSED TREE 2024-09-26 02:03:50 +03:00
Benjamin VanderSloot
a8b2a28dae Bug 1873418 - Support Partitioned cookie attribute for browser extensions - r=robwu,anti-tracking-reviewers,webdriver-reviewers,timhuang,Sasha
The part that is covered here is extending the partitionKey attribute, as in the proposal of aselya here:

https://github.com/w3c/webextensions/pull/581/files

Notably not included is adding the new Cookies.GetPartitionKey function.

Differential Revision: https://phabricator.services.mozilla.com/D219990
2024-09-25 21:55:08 +00:00
Paul Zuehlcke
6b444aace4 Bug 1915419 - CSSCacheCleaner, JSCacheCleaner support for OriginAttributesPattern. r=emilio,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D220713
2024-09-24 09:17:59 +00:00
Fatih
a96b1db972 Bug 1861328: Disable color mode simulation if RFPTarget::CSSPrefersColorScheme is enabled. r=tjr,devtools-backward-compat-reviewers,devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D219803
2024-09-19 16:02:05 +00:00
Butkovits Atila
d779b4bd81 Backed out 12 changesets (bug 1915419) for causing failures at test_bouncetracking_purge.js. CLOSED TREE
Backed out changeset e5c32a502e0f (bug 1915419)
Backed out changeset 8cbcbb25fc99 (bug 1915419)
Backed out changeset 947379a2f167 (bug 1915419)
Backed out changeset 4cfe3a954ade (bug 1915419)
Backed out changeset 94fba1a2786b (bug 1915419)
Backed out changeset 477b4f7c2760 (bug 1915419)
Backed out changeset ed6c8d9d39d4 (bug 1915419)
Backed out changeset e534c390101c (bug 1915419)
Backed out changeset bc3fe74a8b03 (bug 1915419)
Backed out changeset afefdce605f9 (bug 1915419)
Backed out changeset e58887b90d39 (bug 1915419)
Backed out changeset 114298b7b855 (bug 1915419)
2024-09-18 17:49:45 +03:00
Paul Zuehlcke
8e4cb9c9fe Bug 1915419 - CSSCacheCleaner, JSCacheCleaner support for OriginAttributesPattern. r=emilio,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D220713
2024-09-18 12:50:45 +00:00
Norisz Fay
d2360aaab4 Backed out 12 changesets (bug 1915419) for causing clearDataFromBaseDomain related gv-junit failures CLOSED TREE
Backed out changeset 6baf34e653ef (bug 1915419)
Backed out changeset 3015863afd5d (bug 1915419)
Backed out changeset 90558f317a75 (bug 1915419)
Backed out changeset 5f07cb9268dd (bug 1915419)
Backed out changeset aedba16d4af7 (bug 1915419)
Backed out changeset d9a2d5c2ba53 (bug 1915419)
Backed out changeset 4a250c451004 (bug 1915419)
Backed out changeset c6da2e632da6 (bug 1915419)
Backed out changeset 9256540ed21a (bug 1915419)
Backed out changeset 7621d766d6a4 (bug 1915419)
Backed out changeset 16d6589ba330 (bug 1915419)
Backed out changeset b3eebd764439 (bug 1915419)
2024-09-16 18:29:55 +03:00
Paul Zuehlcke
2ac59307af Bug 1915419 - CSSCacheCleaner, JSCacheCleaner support for OriginAttributesPattern. r=emilio,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D220713
2024-09-16 13:25:32 +00:00