diff --git a/dom/base/DOMPrefsInternal.h b/dom/base/DOMPrefsInternal.h index a2047b7833d4..b2197e61b438 100644 --- a/dom/base/DOMPrefsInternal.h +++ b/dom/base/DOMPrefsInternal.h @@ -19,7 +19,6 @@ // * This defines DOMPrefs::FooBar(JSContext* aCx, JSObject* aObj); // This is allows the use of DOMPrefs in WebIDL files. -DOM_PREF(PromiseRejectionEventsEnabled, "dom.promise_rejection_events.enabled") DOM_PREF(PushEnabled, "dom.push.enabled") DOM_PREF(StreamsEnabled, "dom.streams.enabled") DOM_PREF(OffscreenCanvasEnabled, "gfx.offscreencanvas.enabled") @@ -41,7 +40,7 @@ DOM_WEBIDL_PREF2(dom_webnotifications_serviceworker_enabled) DOM_WEBIDL_PREF2(dom_webnotifications_requireinteraction_enabled) DOM_WEBIDL_PREF2(dom_serviceWorkers_enabled) DOM_WEBIDL_PREF2(dom_storageManager_enabled) -DOM_WEBIDL_PREF(PromiseRejectionEventsEnabled) +DOM_WEBIDL_PREF2(dom_promise_rejection_events_enabled) DOM_WEBIDL_PREF(PushEnabled) DOM_WEBIDL_PREF(StreamsEnabled) DOM_WEBIDL_PREF(OffscreenCanvasEnabled) diff --git a/dom/webidl/PromiseRejectionEvent.webidl b/dom/webidl/PromiseRejectionEvent.webidl index a341794cf916..c03f3ae0310e 100644 --- a/dom/webidl/PromiseRejectionEvent.webidl +++ b/dom/webidl/PromiseRejectionEvent.webidl @@ -6,7 +6,7 @@ [Constructor(DOMString type, PromiseRejectionEventInit eventInitDict), Exposed=(Window,Worker), - Func="mozilla::dom::DOMPrefs::PromiseRejectionEventsEnabled"] + Func="mozilla::dom::DOMPrefs::dom_promise_rejection_events_enabled"] interface PromiseRejectionEvent : Event { [BinaryName="rejectedPromise"] diff --git a/modules/libpref/init/StaticPrefList.h b/modules/libpref/init/StaticPrefList.h index a0f089cb27f8..a4085f9ee6ae 100644 --- a/modules/libpref/init/StaticPrefList.h +++ b/modules/libpref/init/StaticPrefList.h @@ -278,6 +278,15 @@ VARCACHE_PREF( ) #undef PREF_VALUE +// WHATWG promise rejection events. See +// https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectionevent +// TODO: Enable the event interface once actually firing it (bug 1362272). +VARCACHE_PREF( + "dom.promise_rejection_events.enabled", + dom_promise_rejection_events_enabled, + RelaxedAtomicBool, false +) + //--------------------------------------------------------------------------- // Clear-Site-Data prefs //--------------------------------------------------------------------------- diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 7380ee8a3559..11b93b568af8 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -5171,11 +5171,6 @@ pref("dom.w3c_pointer_events.dispatch_by_pointer_messages", false); // W3C pointer events draft pref("dom.w3c_pointer_events.implicit_capture", false); -// WHATWG promise rejection events. See -// https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectionevent -// TODO: Enable the event interface once actually firing it (bug 1362272). -pref("dom.promise_rejection_events.enabled", false); - // W3C draft ImageCapture API pref("dom.imagecapture.enabled", false);