зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1492014 replace WorkletLoadInfo::mDumpEnabled with StaticPrefs r=baku
Depends on D6382 Differential Revision: https://phabricator.services.mozilla.com/D6383 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
e6d5b031cb
Коммит
eed1f3fdf3
|
@ -8,6 +8,7 @@
|
|||
#include "mozilla/dom/WorkletGlobalScopeBinding.h"
|
||||
#include "mozilla/dom/WorkletImpl.h"
|
||||
#include "mozilla/dom/Console.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -72,7 +73,7 @@ WorkletGlobalScope::Dump(const Optional<nsAString>& aString) const
|
|||
{
|
||||
WorkletThread::AssertIsOnWorkletThread();
|
||||
|
||||
if (!mImpl->LoadInfo().DumpEnabled()) {
|
||||
if (!StaticPrefs::browser_dom_window_dump_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "WorkletThread.h"
|
||||
|
||||
#include "mozilla/BasePrincipal.h"
|
||||
#include "mozilla/dom/DOMPrefs.h"
|
||||
#include "mozilla/dom/RegisterWorkletBindings.h"
|
||||
#include "mozilla/dom/WorkletBinding.h"
|
||||
|
||||
|
@ -21,7 +20,6 @@ namespace mozilla {
|
|||
|
||||
WorkletLoadInfo::WorkletLoadInfo(nsPIDOMWindowInner* aWindow, nsIPrincipal* aPrincipal)
|
||||
: mInnerWindowID(aWindow->WindowID())
|
||||
, mDumpEnabled(dom::DOMPrefs::DumpEnabled())
|
||||
, mOriginAttributes(BasePrincipal::Cast(aPrincipal)->OriginAttributesRef())
|
||||
, mPrincipal(aPrincipal)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,6 @@ public:
|
|||
|
||||
uint64_t OuterWindowID() const { return mOuterWindowID; }
|
||||
uint64_t InnerWindowID() const { return mInnerWindowID; }
|
||||
bool DumpEnabled() const { return mDumpEnabled; }
|
||||
|
||||
const OriginAttributes& OriginAttributesRef() const
|
||||
{
|
||||
|
@ -49,7 +48,6 @@ private:
|
|||
// Modified only in constructor.
|
||||
uint64_t mOuterWindowID;
|
||||
const uint64_t mInnerWindowID;
|
||||
const bool mDumpEnabled;
|
||||
const OriginAttributes mOriginAttributes;
|
||||
// Accessed on only worklet parent thread.
|
||||
nsCOMPtr<nsIPrincipal> mPrincipal;
|
||||
|
|
Загрузка…
Ссылка в новой задаче