1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #include "mozilla/Atomics.h"
9 #include "mozilla/Preferences.h"
10 #include "mozilla/StaticPrefs.h"
15 void DOMPrefs::Initialize() {
16 MOZ_ASSERT(NS_IsMainThread());
18 // Let's cache all the values on the main-thread.
19 #if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
20 DOMPrefs::DumpEnabled();
23 #define DOM_WEBIDL_PREF(name)
25 #include "DOMPrefsInternal.h"
27 #undef DOM_WEBIDL_PREF
31 bool DOMPrefs::DumpEnabled() {
32 #if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
33 return StaticPrefs::browser_dom_window_dump_enabled();
39 #define DOM_WEBIDL_PREF(name) \
40 /* static */ bool DOMPrefs::name(JSContext* aCx, JSObject* aObj) { \
41 return StaticPrefs::name(); \
44 #include "DOMPrefsInternal.h"
46 #undef DOM_WEBIDL_PREF
49 } // namespace mozilla