Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/base/DOMPrefs.cpp
Line
Count
Source
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/. */
6
7
#include "DOMPrefs.h"
8
#include "mozilla/Atomics.h"
9
#include "mozilla/Preferences.h"
10
#include "mozilla/StaticPrefs.h"
11
12
namespace mozilla {
13
namespace dom {
14
15
void
16
DOMPrefs::Initialize()
17
3
{
18
3
  MOZ_ASSERT(NS_IsMainThread());
19
3
20
3
  // Let's cache all the values on the main-thread.
21
3
#if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
22
3
  DOMPrefs::DumpEnabled();
23
3
#endif
24
3
25
3
#define DOM_WEBIDL_PREF(name)
26
3
27
3
#include "DOMPrefsInternal.h"
28
3
29
3
#undef DOM_WEBIDL_PREF
30
3
}
31
32
/* static */ bool
33
DOMPrefs::DumpEnabled()
34
3
{
35
3
#if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
36
3
  return StaticPrefs::browser_dom_window_dump_enabled();
37
#else
38
  return true;
39
#endif
40
}
41
42
#define DOM_WEBIDL_PREF(name)                    \
43
  /* static */ bool                              \
44
  DOMPrefs::name(JSContext* aCx, JSObject* aObj) \
45
1
  {                                              \
46
1
    return StaticPrefs::name();                  \
47
1
  }
Unexecuted instantiation: mozilla::dom::DOMPrefs::canvas_imagebitmap_extensions_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_caches_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_webnotifications_serviceworker_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_webnotifications_requireinteraction_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_serviceWorkers_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_storageManager_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_promise_rejection_events_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_push_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_streams_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::gfx_offscreencanvas_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_webkitBlink_dirPicker_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_netinfo_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_fetchObserver_enabled(JSContext*, JSObject*)
Unexecuted instantiation: mozilla::dom::DOMPrefs::dom_enable_performance_observer(JSContext*, JSObject*)
mozilla::dom::DOMPrefs::dom_performance_enable_scheduler_timing(JSContext*, JSObject*)
Line
Count
Source
45
1
  {                                              \
46
1
    return StaticPrefs::name();                  \
47
1
  }
48
49
#include "DOMPrefsInternal.h"
50
51
#undef DOM_WEBIDL_PREF
52
53
} // dom namespace
54
} // mozilla namespace