This patch introduces ServiceWorkerQuotaUtils.h, which provides helper methods related nsIQuotaManagerService and nsIClearDataService.
QuotaUsageChecker implements the quota usage checking algorithm.
1. Getting the given origin/group usage through QuotaManagerService. QuotaUsageCheck::Start() implements this step.
2. Checking if the group usage headroom(gGroupUsageHeadRoom) is satisfied. It could be following three situations. a. Group headroom is satisfied without any usage mitigation. b. Group headroom is satisfied after origin usage mitigation. This invokes nsIClearDataService::DeleteDataFromPrincipal(). c. Group headroom is satisfied after group usage mitigation. This invokes nsIClearDataService::DeleteDataFromBaseDomain().
QuotaUsageChecker::CheckQuotaHeadRoom() implements this step.
If the algorithm is done or error out, the QuotaUsageCheck::mCallback will be called with a bool result for external handling.
Depends on D122188
Differential Revision: https://phabricator.services.mozilla.com/D122189
This patch implements methods for ServiceWorkerRegistrationInfo to invoke the quota usage checking.
ServiceWorkerRegistrationInfo::CheckQuotaUsage() is an internal using method, such that it is a private method.
Differential Revision: https://phabricator.services.mozilla.com/D120964
The SetupEMEPref helper is no longer needed. This patch removes it from tests.
This patch does some minimal restyling and simplifying of the tests following
removal, but largely does not change them. There should be *no* logic changed in
the tests following the patch. They should run as before.
Differential Revision: https://phabricator.services.mozilla.com/D123630
We will fail to get the service if this function is called and we're already in
shutdown. Call sites for this function do not guard against doing so (and I'm
not sure there's a nice way to check). So we need to handle failure in the
function and have call sites check if this failed.
An alternative function is added, MustGetShutdownBarrier, which maintains the
original behaviour. Callers that still wish to crash on failure can instead opt
to use this function.
Differential Revision: https://phabricator.services.mozilla.com/D123001
NOTE! In cases where there is no HTTP-layer encoding declaration, and CSS
parsing inherits the encoding from the HTML document, for preloads, this
changes the inherited encoding from windows-1252 to UTF-8 in order to
make the speculative encoding correct in the common `<meta charset=utf-8>`
case.
Differential Revision: https://phabricator.services.mozilla.com/D123593
CLOSED TREE
Backed out changeset d0864a5c8e90 (bug 1725555)
Backed out changeset 22b941581212 (bug 1725555)
Backed out changeset f2357e055668 (bug 1725555)
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.
Depends on D122999
Differential Revision: https://phabricator.services.mozilla.com/D123000
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.
Depends on D122998
Differential Revision: https://phabricator.services.mozilla.com/D122999
It would be nice to be able to auto-generate a string, but on Windows we only
have a very long name with all the qualifiers, and it's unreadable in practice
in the marker view.
This allows having names that are more human friendly and shorter. Generally
it's going to be the name of the function though.
Differential Revision: https://phabricator.services.mozilla.com/D122737
Add several test cases to cover our cbcs path. These test a number of different
patterns. These patterns are
- 1:9, 5:5, 10:0. These are more conventional patterns.
- 7:7, 9:8. These are not conventional. Both go against the spec by not summing
to 10. This tests we can appropriately handle unconventional cases.
Note that the spec says patterns should only be applied to video tracks. So in
all cases the audio actually use 0:0 (full encryption). So these test cases also
cover the 0:0 case.
Differential Revision: https://phabricator.services.mozilla.com/D123498
After some investigation, I was able to find a theoretical codepath
which could lead to the "missing initial frame browsing context" error:
1. Two iframes are created for the same origin, and begin process
switching.
2. The first iframe finishes process switching, but for some reason
(e.g. being in shutdown) the call to `LaunchSubprocessResolve`
errors.
3. The second callback is called and also calls LaunchSubprocessResolve,
which this time returns `true` due to it previously having been
called.
4. The BrowserParent is created in the new content process despite
`InitInternal()` never having been finished, and therefore the
ContentParent never becoming subscribed to the BrowsingContextGroup.
To fix this, I made 2 changes:
1. Abort from process switching if the target process which we're going
to be creating a BrowserParent in `IsDead()`, and
2. Track the return value from `LaunchSubprocessResolve`, so we return
`false` if it is called a second time after a failed content process
launch.
I'm not confident that this is the cause of the crashes, as I was unable
to reproduce the issue.
Differential Revision: https://phabricator.services.mozilla.com/D123548
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.
This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.
Differential Revision: https://phabricator.services.mozilla.com/D122345