This change utilizes components.conf to distinguish between the contract implementations of nsISessionStoreFunctions per platform.
Differential Revision: https://phabricator.services.mozilla.com/D206904
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
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
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
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
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
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
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
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
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
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
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
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
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