зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1778510: Add a ShouldRFP boolean to Worklets r=asuth
This will be needed when we set the Javascript Realm options for Worklets. Depends on D151283 Differential Revision: https://phabricator.services.mozilla.com/D151297
This commit is contained in:
Родитель
a1dd535147
Коммит
e77e364a98
|
@ -72,6 +72,10 @@ bool WorkletGlobalScope::IsSharedMemoryAllowed() const {
|
|||
return mImpl->IsSharedMemoryAllowed();
|
||||
}
|
||||
|
||||
bool WorkletGlobalScope::ShouldResistFingerprinting() const {
|
||||
return mImpl->ShouldResistFingerprinting();
|
||||
}
|
||||
|
||||
void WorkletGlobalScope::Dump(const Optional<nsAString>& aString) const {
|
||||
WorkletThread::AssertIsOnWorkletThread();
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ class WorkletGlobalScope : public nsIGlobalObject, public nsWrapperCache {
|
|||
OriginTrials Trials() const override;
|
||||
Maybe<nsID> GetAgentClusterId() const override;
|
||||
bool IsSharedMemoryAllowed() const override;
|
||||
bool ShouldResistFingerprinting() const override;
|
||||
|
||||
protected:
|
||||
~WorkletGlobalScope();
|
||||
|
|
|
@ -52,6 +52,9 @@ WorkletImpl::WorkletImpl(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
|
|||
|
||||
mSharedMemoryAllowed =
|
||||
nsGlobalWindowInner::Cast(aWindow)->IsSharedMemoryAllowed();
|
||||
|
||||
mShouldResistFingerprinting =
|
||||
aWindow->AsGlobal()->ShouldResistFingerprinting();
|
||||
}
|
||||
|
||||
WorkletImpl::~WorkletImpl() {
|
||||
|
|
|
@ -82,6 +82,9 @@ class WorkletImpl {
|
|||
const Maybe<nsID>& GetAgentClusterId() const { return mAgentClusterId; }
|
||||
|
||||
bool IsSharedMemoryAllowed() const { return mSharedMemoryAllowed; }
|
||||
bool ShouldResistFingerprinting() const {
|
||||
return mShouldResistFingerprinting;
|
||||
}
|
||||
|
||||
virtual void OnAddModuleStarted() const {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
@ -117,6 +120,7 @@ class WorkletImpl {
|
|||
Maybe<nsID> mAgentClusterId;
|
||||
|
||||
bool mSharedMemoryAllowed;
|
||||
bool mShouldResistFingerprinting;
|
||||
|
||||
const OriginTrials mTrials;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче