зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1489844 - Port DOMPrefs to StaticPrefs - part 20 - devtools.enabled, r=ehsan
This commit is contained in:
Родитель
7de64f2060
Коммит
841dd1282e
|
@ -19,7 +19,6 @@
|
|||
// * This defines DOMPrefs::FooBar(JSContext* aCx, JSObject* aObj);
|
||||
// This is allows the use of DOMPrefs in WebIDL files.
|
||||
|
||||
DOM_PREF(DevToolsEnabled, "devtools.enabled")
|
||||
DOM_PREF(PerformanceObserverEnabled, "dom.enable_performance_observer")
|
||||
DOM_PREF(IndexedDBStorageOptionsEnabled, "dom.indexedDB.storageOption.enabled")
|
||||
#ifdef JS_BUILD_BINAST
|
||||
|
|
|
@ -1163,12 +1163,6 @@ public:
|
|||
nsACString& aSourceSpecOut, uint32_t *aLineOut,
|
||||
uint32_t *aColumnOut, nsString& aMessageOut);
|
||||
|
||||
/**
|
||||
* Helper function to tell if user ever enabled DevTools explicitely.
|
||||
* Allows making DevTools related API no-op until user do so.
|
||||
*/
|
||||
static bool DevToolsEnabled(JSContext* aCx);
|
||||
|
||||
static nsresult CalculateBufferSizeForImage(const uint32_t& aStride,
|
||||
const mozilla::gfx::IntSize& aImageSize,
|
||||
const mozilla::gfx::SurfaceFormat& aFormat,
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "mozilla/dom/WorkletGlobalScope.h"
|
||||
#include "mozilla/dom/WorkletThread.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/StaticPrefs.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsDocument.h"
|
||||
#include "nsDOMNavigationTiming.h"
|
||||
|
@ -1356,7 +1357,7 @@ Console::IsEnabled(JSContext* aCx) const
|
|||
}
|
||||
|
||||
// Make all Console API no-op if DevTools aren't enabled.
|
||||
return DOMPrefs::DevToolsEnabled();
|
||||
return StaticPrefs::devtools_enabled();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1493,6 +1493,16 @@ VARCACHE_PREF(
|
|||
bool, false
|
||||
)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// DevTools prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
VARCACHE_PREF(
|
||||
"devtools.enabled",
|
||||
devtools_enabled,
|
||||
RelaxedAtomicBool, false
|
||||
)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// End of prefs
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче