The default value for the target is Unknown, so all callsites
keep working.
We also add a Target value used for Document precomputation. This
value is enabled in RFP Lite mode, and allows us to precompute
ShouldRFP and cache it for faster computations later. (The later
computations will still check the Target, but won't need to do the
other expensive checks.)
Differential Revision: https://phabricator.services.mozilla.com/D170891
This implements a method to initialize the moduleLoader for workers. This will initialize only once, for all worker types (module and classic).
Depends on D147324
Differential Revision: https://phabricator.services.mozilla.com/D147326
These methods only existed because nsIGlobalObject::PrincipalOrNull was not
available off-main-thread, so can now be removed.
Depends on D165198
Differential Revision: https://phabricator.services.mozilla.com/D165199
This implements a method to initialize the moduleLoader for workers. This will initialize only once, for all worker types (module and classic).
Depends on D147324
Differential Revision: https://phabricator.services.mozilla.com/D147326
This implements a method to initialize the moduleLoader for workers. This will initialize only once, for all worker types (module and classic).
Depends on D147324
Differential Revision: https://phabricator.services.mozilla.com/D147326
In some unusual cases, WorkerGlobalScope could live longer than WorkerPrivate since some other objects hold a reference on WorkerGlobalScope. We try to use CC/GC to release WorkerGlobalScope and force disconnect them from the WorkerPrivate before releasing WorkerPrivate. https://searchfox.org/mozilla-central/rev/83b86005c6913c2062419efb8aabdf2e683aa47f/dom/workers/RuntimeService.cpp#2068-2109
The previous implementation focused on nulling the WorkerGlobalScopeBase::mWorkerPrivate. However, it is not enough since WorkerGlobalScope's member could possibly hold a CheckedUnsafePtr<WorkerPrivate>, i.e. WorkerGlobalScope::mPerformance.
In this patch, we focus on breaking these connections.
Differential Revision: https://phabricator.services.mozilla.com/D162575
This centralizes the logic in one place.
In order to do this, we will need to check the principal
off-main thread. (Well, we need to know if it's System
Principal.) Worker and Worklet need special ways to do
this, so create a virtual method for it and let them
override it. This is analogous to the ShouldRFP method
on GlobalObject.
Differential Revision: https://phabricator.services.mozilla.com/D157564
This does not remove mShouldResistFingerprinting from
WorkerPrivate->mLoadInfo. This is because in between
mLoadInfo getting initialized (including where shouldRFP gets
set) and when the worker's global scope is constructed, we
need to keep track of whether we shouldRFP or not. We could
make this single bool an outparam of GetLoadInfo to later
pass to GetOrCreateGlobalScope, but that seems noisy.
Differential Revision: https://phabricator.services.mozilla.com/D157563
This centralizes the logic in one place.
In order to do this, we will need to check the principal
off-main thread. (Well, we need to know if it's System
Principal.) Worker and Worklet need special ways to do
this, so create a virtual method for it and let them
override it. This is analogous to the ShouldRFP method
on GlobalObject.
Differential Revision: https://phabricator.services.mozilla.com/D157564
This does not remove mShouldResistFingerprinting from
WorkerPrivate->mLoadInfo. This is because in between
mLoadInfo getting initialized (including where shouldRFP gets
set) and when the worker's global scope is constructed, we
need to keep track of whether we shouldRFP or not. We could
make this single bool an outparam of GetLoadInfo to later
pass to GetOrCreateGlobalScope, but that seems noisy.
Differential Revision: https://phabricator.services.mozilla.com/D157563
This centralizes the logic in one place.
In order to do this, we will need to check the principal
off-main thread. (Well, we need to know if it's System
Principal.) Worker and Worklet need special ways to do
this, so create a virtual method for it and let them
override it. This is analogous to the ShouldRFP method
on GlobalObject.
Differential Revision: https://phabricator.services.mozilla.com/D157564
This does not remove mShouldResistFingerprinting from
WorkerPrivate->mLoadInfo. This is because in between
mLoadInfo getting initialized (including where shouldRFP gets
set) and when the worker's global scope is constructed, we
need to keep track of whether we shouldRFP or not. We could
make this single bool an outparam of GetLoadInfo to later
pass to GetOrCreateGlobalScope, but that seems noisy.
Differential Revision: https://phabricator.services.mozilla.com/D157563
nsGlobalWindowInner, WorkerGlobalScopeBase, BackstagePas and SandboxPrivate now
explicitly provide GetStorageKey implementation which explicitly block null and
expanded principals. All other globals (nsGlobalWindowOuter, SimpleGlobalObject,
ShadowRealmGlobalScope and WorkletGlobalScope) inherit the default
implementation which returns NS_ERROR_NOT_AVAILABLE.
Differential Revision: https://phabricator.services.mozilla.com/D162087
It turns out that websites break with different reasons when hiding things. At this point we want to stop revising the hack further and instead gather the data about how many websites are currently affected.
Differential Revision: https://phabricator.services.mozilla.com/D154578
It turns out that websites break with different reasons when hiding things. At this point we want to stop revising the hack further and instead gather the data about how many websites are currently affected.
Differential Revision: https://phabricator.services.mozilla.com/D154578
It turns out that websites break with different reasons when hiding things. At this point we want to stop revising the hack further and instead gather the data about how many websites are currently affected.
Differential Revision: https://phabricator.services.mozilla.com/D154578
This will be used from the DevTools webconsole to clear events when
the user hits the clear button in the UI.
A test for the console is added in the next patch of the queue.
Differential Revision: https://phabricator.services.mozilla.com/D138314
This will be used from the DevTools webconsole to clear events when
the user hits the clear button in the UI.
A test for the console is added in the next patch of the queue.
Differential Revision: https://phabricator.services.mozilla.com/D138314