Commit Graph

415 Commits

Author SHA1 Message Date
kycn
03568c5097 Bug 1677190 - Introduce SessionStoreFunctions for GeckoView package and move the existing SessionStoreFunctions from toolkit to the browser package. r=geckoview-reviewers,farre,nika,owlish
This change utilizes components.conf to distinguish between the contract implementations of nsISessionStoreFunctions per platform.

Differential Revision: https://phabricator.services.mozilla.com/D206904
2024-04-30 11:17:55 +00:00
Nika Layzell
656f3c5a4a Bug 1875528 - Part 6: Allow cycle-collecting the strong IPDL Manager reference, r=mccr8
There are a few IPDL actors which are cycle-collected, including `PBrowser`,
`PContent`, and `PWindowGlobal`.

This patch adds support for these actors to traverse and unlink the new strong
Manager() reference added by IPDL, allowing cycles containing these actors to
be properly unlinked and avoiding leaks.

Differential Revision: https://phabricator.services.mozilla.com/D198629
2024-04-22 17:13:24 +00:00
Paul Zuehlcke
fd682138db Bug 1848406 - Detect stateful bounces for window associated storages. r=bvandersloot,asuth
Differential Revision: https://phabricator.services.mozilla.com/D203607
2024-04-17 20:29:04 +00:00
Norisz Fay
7cdea11ce1 Backed out 15 changesets (bug 1843308, bug 1889444, bug 1888504, bug 1890546, bug 1888500, bug 1848406, bug 1890782) for causing bustage on BounceTrackingProtection.h CLOSED TREE
Backed out changeset 09168636f92e (bug 1890782)
Backed out changeset 45c9c902f35f (bug 1889444)
Backed out changeset 7cd441010547 (bug 1889444)
Backed out changeset 692d3fb54e2c (bug 1890546)
Backed out changeset 4c476414499a (bug 1843308)
Backed out changeset fc70ef415bfe (bug 1888504)
Backed out changeset e400fe8e13ac (bug 1888500)
Backed out changeset 336738f93085 (bug 1888500)
Backed out changeset 40fdfaf3cc32 (bug 1848406)
Backed out changeset 6a3ec1f62811 (bug 1848406)
Backed out changeset 5ea32ea95f62 (bug 1848406)
Backed out changeset df982722bc0a (bug 1848406)
Backed out changeset 6808ec37fa93 (bug 1848406)
Backed out changeset 36b8e78cc27e (bug 1848406)
Backed out changeset d63358e762de (bug 1848406)
2024-04-11 23:07:40 +03:00
Paul Zuehlcke
f895782096 Bug 1848406 - Detect stateful bounces for window associated storages. r=bvandersloot,asuth
Differential Revision: https://phabricator.services.mozilla.com/D203607
2024-04-11 19:03:15 +00:00
Sandor Molnar
e7bdbd80c9 Backed out 12 changesets (bug 1843308, bug 1848406, bug 1888500, bug 1888504, bug 1890546) for causing AddressSanitizer @ xpcom/base/nsISupportsImpl.cpp & bc failures @ toolkit/components/antitracking/bouncetrackingprotection/test/browser/<...> CLOSED TREE
Backed out changeset 4537591cca64 (bug 1890546)
Backed out changeset b29ebdf1439e (bug 1843308)
Backed out changeset 7c22cf88677f (bug 1888504)
Backed out changeset b85173dc6c16 (bug 1888500)
Backed out changeset 02d68d4511c7 (bug 1888500)
Backed out changeset 42ab5bd4b856 (bug 1848406)
Backed out changeset 6ce0fba99d02 (bug 1848406)
Backed out changeset affbf180e519 (bug 1848406)
Backed out changeset 80365ce68377 (bug 1848406)
Backed out changeset d75faab0301f (bug 1848406)
Backed out changeset 940c5fd39d25 (bug 1848406)
Backed out changeset 31016e129e99 (bug 1848406)
2024-04-10 22:10:33 +03:00
Paul Zuehlcke
263481b845 Bug 1848406 - Detect stateful bounces for window associated storages. r=bvandersloot,asuth
Differential Revision: https://phabricator.services.mozilla.com/D203607
2024-04-10 14:12:38 +00:00
Tom Ritter
447cc7b883 Bug 1886922: Do not dereference a Maybe if it is not Some r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D205409
2024-03-22 15:32:39 +00:00
aiunusov
284c989d4f Bug 1883860 - nsDocShell::HandleSameDocumentNavigation() cause crash in SetDocumentURI, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D204611
2024-03-22 12:27:38 +00:00
Sandor Molnar
b53841b100 Backed out changeset 7b83373f7a9e (bug 1883860) for causing build bustages @ caps/tests/gtest/TestScriptSecurityManager.cpp CLOSED TREE 2024-03-22 02:35:03 +02:00
aiunusov
8e05e984ea Bug 1883860 - nsDocShell::HandleSameDocumentNavigation() cause crash in SetDocumentURI, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D204611
2024-03-22 00:07:27 +00:00
Tom Ritter
3ca3578c6a Bug 1884732: Log JSActor messages with MMPrinter r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D204677
2024-03-19 18:58:16 +00:00
Perry McManis
d4957a3f62 Bug 1885179 - single accumulation API integration r=TravisLong,cookie-reviewers,valentin,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D204433
2024-03-19 13:37:15 +00:00
Perry McManis
68edc94d59 Bug 1877576 - Migrate geckoview GVST probes r=geckoview-reviewers,perry.mcmanis,owlish
Most are brought over straightforwardly, their Telemetry callsites reworded
to use Glean, with mirroring to the Telemetry probes taken care of by the Glean
Interface For Firefox Telemetry (see the telemetry_mirror property).

There were some special cases:
* HistogramStopwatch becomes GleanStopwatch.
  After migration it was only serving Glean consumers.
  Could've used standard Glean APIs, but having something to hold the TimerIds
  was convenient.
* GV_STARTUP_MODULES_MS was removed.
  It was configured to only report for the `firefox` product,
  but could only have a value in `geckoview_streaming`,
  so never reported data.
* MEDIA_DECODING_PROCESS_CRASH was removed.
  It was configured to only report for the `firefox` product,
  but could only have a value in `geckoview_streaming`,
  so never reported data.
* GV_CONTENT_PROCESS_LIFETIME_MS was removed.
  It was configured to only report for the `geckoview_streaming` product,
  meaning it only reported data when used with GVST to reach the Glean
  `geckoview.content_process_lifetime` metric.
  This is now accomplished directly.
* GV_STARTUP_RUNTIME_MS was removed.
  Though it was configured to report data for both `firefox` and
  `geckoview_streaming` products, it only ever had values in geckoview.
  Its data continues to be reported via `geckoview.startup_runtime`.
* gecko.version and gecko.build_id (Scalars) were removed.
  In Firefox Desktop this information is available in the `application`
  section of the Environment.
  In geckoview-using products, this information continues to be available via
  `geckoview.version` and `geckoview.build_id`.
* GV_STARTUP_RUNTIME_MS and GV_CONTENT_PROCESS_LIFETIME_MS are handled oddly.
  Since those probes were recorded in the Java portion of the code,
  and that portion doesn't include Glean,
  we use `nativeAddHistogram` to relay the samples for those two pieces of
  instrumentation.
  If there will be more instrumentation landing in that part of the code,
  I recommend you review the instructions for including the Glean SDK in a
  library, and retire this use of JNI.

Differential Revision: https://phabricator.services.mozilla.com/D200094
2024-02-09 21:11:05 +00:00
Andrew McCreight
f7eb2f5e14 Bug 1877879 - Implement isActiveInTab and use it for PromptParent. r=smaug,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D200245
2024-02-05 16:16:22 +00:00
Chris H-C
017bebdfaa Bug 1877273 - Remove Telemetry-based Use Counters r=emilio
Glean-based Use Counter metrics are cheaper and work as well,
so let's use them instead.

Though we do have metric name strings available in a string table in GleanJSMetrics.cpp,
access is through metric_entry_t which has information not available to usecounters.py.
So for now we return char* literals from the use counter increment fns.

Differential Revision: https://phabricator.services.mozilla.com/D199933
2024-02-01 19:45:33 +00:00
Sandor Molnar
943b4f1994 Backed out changeset 2ee5ce9b3c67 (bug 1877273) for causing build bustage at UseCounterMetrics CLOSED TREE 2024-02-01 00:35:37 +02:00
Chris H-C
8a9cf51a59 Bug 1877273 - Remove Telemetry-based Use Counters r=emilio
Glean-based Use Counter metrics are cheaper and work as well,
so let's use them instead.

Though we do have metric name strings available in a string table in GleanJSMetrics.cpp,
access is through metric_entry_t which has information not available to usecounters.py.
So for now we return char* literals from the use counter increment fns.

Differential Revision: https://phabricator.services.mozilla.com/D199933
2024-01-31 21:37:29 +00:00
Iulian Moraru
585f090514 Backed out changeset f334593f5b54 (bug 1877273) for causing non-unified build bustages on UseCounterMetrics.cpp. 2024-01-31 19:26:17 +02:00
Chris H-C
97e6afec9c Bug 1877273 - Remove Telemetry-based Use Counters r=emilio
Glean-based Use Counter metrics are cheaper and work as well,
so let's use them instead.

Though we do have metric name strings available in a string table in GleanJSMetrics.cpp,
access is through metric_entry_t which has information not available to usecounters.py.
So for now we return char* literals from the use counter increment fns.

Differential Revision: https://phabricator.services.mozilla.com/D199933
2024-01-31 16:04:45 +00:00
Stanca Serban
6980988721 Backed out 6 changesets (bug 1875528) for causing leakcheck failures. CLOSED TREE
Backed out changeset dcbbb7316940 (bug 1875528)
Backed out changeset a5c0564f9761 (bug 1875528)
Backed out changeset f3bc6e972f79 (bug 1875528)
Backed out changeset 535378dd79b0 (bug 1875528)
Backed out changeset 3cef14ed0f25 (bug 1875528)
Backed out changeset f0941fdbbabb (bug 1875528)
2024-01-25 01:26:46 +02:00
Nika Layzell
ba697a7ca5 Bug 1875528 - Part 6: Allow cycle-collecting the strong IPDL Manager reference, r=mccr8
There are a few IPDL actors which are cycle-collected, including `PBrowser`,
`PContent`, and `PWindowGlobal`.

This patch adds support for these actors to traverse and unlink the new strong
Manager() reference added by IPDL, allowing cycles containing these actors to
be properly unlinked and avoiding leaks.

Differential Revision: https://phabricator.services.mozilla.com/D198629
2024-01-24 20:54:42 +00:00
Christian Holler (:decoder)
6512c73962 Bug 1875498 - Make URI non-nullable in some WindowGlobal methods. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D199108
2024-01-22 18:57:20 +00:00
aiunusov
81f5d90484 Bug 1868387 - Part 1: Make a pref, that enables origin security check for SetDocumentURI() method, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D195554
2023-12-13 15:14:35 +00:00
Chris H-C
8248d04c01 Bug 1852098 - Increment Glean use counter metrics and submit the use-counters ping during shutdown r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D193250
2023-11-21 17:09:54 +00:00
Jonathan Watt
efb5a74fbc Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D193987
2023-11-21 12:45:59 +00:00
aiunusov
0d2c232e9e Bug 1783504 - tweak when UpdateDocumentURI can be set, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D159340
2023-11-20 16:06:00 +00:00
Narcis Beleuzu
aeac4d77e1 Backed out 7 changesets (bug 1852098) for bustages on UseCounterMetrics.h . CLOSED TREE
Backed out changeset 3b87419a9eea (bug 1852098)
Backed out changeset d9c7c84c82df (bug 1852098)
Backed out changeset e594c7eebb91 (bug 1852098)
Backed out changeset 15e0b0bd3bfb (bug 1852098)
Backed out changeset 220e9ee63ec3 (bug 1852098)
Backed out changeset 9edef145d1c5 (bug 1852098)
Backed out changeset 920a798dbb8a (bug 1852098)
2023-11-16 01:00:42 +02:00
Chris H-C
be4023d4f6 Bug 1852098 - Increment Glean use counter metrics and submit the use-counters ping during shutdown r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D193250
2023-11-15 21:34:12 +00:00
Stanca Serban
7f8a3ccc5e Backed out 7 changesets (bug 1852098) for causing build bustages in UseCounterMetrics.cpp. CLOSED TREE
Backed out changeset 2caabd4bfe86 (bug 1852098)
Backed out changeset 5c174b0ee1ab (bug 1852098)
Backed out changeset 05ba23510b93 (bug 1852098)
Backed out changeset 256984effaa2 (bug 1852098)
Backed out changeset 8bed08cf2a68 (bug 1852098)
Backed out changeset 16b0698a239d (bug 1852098)
Backed out changeset 6e8d54a51fb7 (bug 1852098)
2023-11-15 23:02:32 +02:00
Chris H-C
1a8a70316b Bug 1852098 - Increment Glean use counter metrics and submit the use-counters ping during shutdown r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D193250
2023-11-15 17:01:30 +00:00
Sandor Molnar
2646858129 Backed out changeset 724cb235ebec (bug 1783504) for crashes on crash stats on Android Nightly 2023-11-15 14:46:45 +02:00
aiunusov
8e3e455fe8 Bug 1783504 - tweak when UpdateDocumentURI can be set, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D159340
2023-11-13 20:51:31 +00:00
Tom Schuster
489ae02a57 Bug 1847990 - Font fingerprinting detection and telemetry. r=timhuang,jfkthame,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D192074
2023-11-13 10:05:22 +00:00
Tom Schuster
b69f140767 Bug 1847990 - Canvas fingerprinting telemetry. r=timhuang,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189111
2023-11-13 10:05:22 +00:00
Benjamin VanderSloot
9e9a008e34 Bug 1858494 - Return permission action rather than boolean when fetching the storage access permission from the parent process - r=timhuang,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D190722
2023-10-12 16:58:22 +00:00
Paul Zuehlcke
63537d9b6a Bug 1854028 - Update BounceTrackingStorageObserver cookie check and remove nsICookieNotification isThirdPartyCookie. r=bvandersloot,cookie-reviewers,anti-tracking-reviewers,timhuang
For the BounceTrackingStorageObserver, instead of passing in a third-party flag
we can simply check if the changed cookie is partitioned or not.

Differential Revision: https://phabricator.services.mozilla.com/D188732
2023-09-21 14:42:32 +00:00
Andrew McCreight
02d63b4175 Bug 1842936 - Make WindowGlobalParent::IsCurrentGlobal() consistent with nsPIDOMWindowInner::IsCurrentInnerWindow(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D183311
2023-09-18 23:16:59 +00:00
Paul Zuehlcke
24e4312973 Bug 1839918 - Avoid returning IPC failures where possible in RecvSetCookies to avoid crashes. r=bvandersloot,necko-reviewers,jesup
Depends on D186215

Differential Revision: https://phabricator.services.mozilla.com/D188329
2023-09-18 11:55:10 +00:00
Paul Zuehlcke
6e316940e6 Bug 1839918 - Create SetCookies variant for document.cookie on PWindowGlobal. r=bvandersloot,cookie-reviewers,valentin
Using PWindowGlobal for SetCookies calls from content to parent process means we can get
the BrowsingContext the cookies are set for. The current implementation in PCookieService
drops this relationship.
I'm leaving in the old SetCookies call for cases where the inner window is null. This
happens for some of the cookie tests.

Depends on D185303

Differential Revision: https://phabricator.services.mozilla.com/D186045
2023-09-18 11:55:09 +00:00
Harshit Sohaney
3898675cdd Bug 1835913 - Deprecating RejectForeignAllowList. r=bvandersloot,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187286
2023-09-14 15:41:40 +00:00
Cosmin Sabou
ba8a89ba9e Backed out 9 changesets (bug 1839918) for causing a top crash as in Bug 1852357. a=backout
Backed out changeset 1c438df525c7 (bug 1839918)
Backed out changeset 6e3d7fdfda3f (bug 1839918)
Backed out changeset 087b27593538 (bug 1839918)
Backed out changeset 302d12c12083 (bug 1839918)
Backed out changeset 750e0796c1ad (bug 1839918)
Backed out changeset 3949d9b400d4 (bug 1839918)
Backed out changeset 707021ebfd23 (bug 1839918)
Backed out changeset fa9a6af80526 (bug 1839918)
Backed out changeset 5aa3b2f1b5ec (bug 1839918)
2023-09-11 16:42:08 +03:00
Paul Zuehlcke
fc945d2f00 Bug 1839918 - Create SetCookies variant for document.cookie on PWindowGlobal. r=bvandersloot,cookie-reviewers,valentin
Using PWindowGlobal for SetCookies calls from content to parent process means we can get
the BrowsingContext the cookies are set for. The current implementation in PCookieService
drops this relationship.
I'm leaving in the old SetCookies call for cases where the inner window is null. This
happens for some of the cookie tests.

Differential Revision: https://phabricator.services.mozilla.com/D186045
2023-09-07 08:25:55 +00:00
Emilio Cobos Álvarez
9d1851a1aa Bug 1845779 - Don't report use counter data for content-inaccessible about:blank documents. r=nika
Our counters are super low because we report lots of empty entries for
these. It seems just opening a new tab is enough to trigger this.

While at it I found that we also report about:preferences / about:config
since they use the system principal. Also block those.

Differential Revision: https://phabricator.services.mozilla.com/D184834
2023-08-16 10:23:22 +00:00
Narcis Beleuzu
6c86176809 Backed out changeset 88ec6682eab1 (bug 1845779) for bc failure on browser_use_counters.js . CLOSED TREE 2023-08-15 17:21:28 +03:00
Benjamin VanderSloot
b5cc86c920 Bug 1835907, part 4 - Test the storage access permission before prompting the user - r=anti-tracking-reviewers,pbz
Because the Document's Channel's LoadInfo is no longer being set to reflect the storage-access permission, we need to test if the permission is set before we ask the user about it.

Currently I opted for an IPC (and one we already have) in Fission. We could cut this out with an extra bit on the document, but I don't think this is performance-critical since it only happens on prompt-able requestStorageAccess calls.

Differential Revision: https://phabricator.services.mozilla.com/D184824
2023-08-15 13:04:05 +00:00
Emilio Cobos Álvarez
24b79b3a7c Bug 1845779 - Don't report use counter data for content-inaccessible about:blank documents. r=nika
Our counters are super low because we report lots of empty entries for
these. It seems just opening a new tab is enough to trigger this.

While at it I found that we also report about:preferences / about:config
since they use the system principal. Also block those.

Differential Revision: https://phabricator.services.mozilla.com/D184834
2023-08-14 23:22:37 +00:00
Cosmin Sabou
819840f3b4 Backed out 6 changesets (bug 1835907) for causing multiple failures. CLOSED TREE
Backed out changeset 91ef29afec50 (bug 1835907)
Backed out changeset 989479621780 (bug 1835907)
Backed out changeset 86e3f98ceb31 (bug 1835907)
Backed out changeset 4790e44c234c (bug 1835907)
Backed out changeset bb9f48eec5bf (bug 1835907)
Backed out changeset 74f90708260a (bug 1835907)
2023-08-14 22:18:10 +03:00
Benjamin VanderSloot
598a8c5467 Bug 1835907, part 4 - Test the storage access permission before prompting the user - r=anti-tracking-reviewers,pbz
Because the Document's Channel's LoadInfo is no longer being set to reflect the storage-access permission, we need to test if the permission is set before we ask the user about it.

Currently I opted for an IPC (and one we already have) in Fission. We could cut this out with an extra bit on the document, but I don't think this is performance-critical since it only happens on prompt-able requestStorageAccess calls.

Differential Revision: https://phabricator.services.mozilla.com/D184824
2023-08-14 18:02:46 +00:00
Christian Holler (:decoder)
a4c7752dc0 Bug 1847788 - Add missing null check to RecvReloadWithHttpsOnlyException. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D185690
2023-08-09 15:47:49 +00:00