From 15a5560a3d267ebd5eb3eb3639590f06cfae692b Mon Sep 17 00:00:00 2001 From: Gregory Pappas Date: Wed, 19 Jul 2023 12:41:18 +0000 Subject: [PATCH] Bug 1630497 - Remove dom.audioworklet.enabled and dom.worklet.enabled prefs r=padenot,webidl,saschanaz Differential Revision: https://phabricator.services.mozilla.com/D183645 --- .../browser_webconsole_worker_promise_error.js | 7 ------- .../browser/browser_webconsole_worklet_error.js | 7 ------- dom/media/MediaTrackGraph.cpp | 3 +-- .../whatwg/test_structuredCloneAndExposed.html | 8 +------- dom/webidl/AudioParamMap.webidl | 3 +-- dom/webidl/AudioWorklet.webidl | 2 +- dom/webidl/AudioWorkletNode.webidl | 3 +-- dom/webidl/BaseAudioContext.webidl | 2 +- dom/webidl/Worklet.webidl | 3 +-- dom/worklet/tests/common.js | 15 +++++++++------ dom/worklet/tests/test_audioWorklet.html | 4 ---- ..._audioWorkletGlobalScopeRegisterProcessor.html | 4 ---- dom/worklet/tests/test_audioWorklet_WASM.html | 3 +-- .../tests/test_audioWorklet_insecureContext.html | 7 ------- dom/worklet/tests/test_audioWorklet_options.html | 3 +-- dom/worklet/tests/test_basic.html | 7 ------- dom/worklet/tests/test_console.html | 4 ---- dom/worklet/tests/test_dump.html | 7 ------- dom/worklet/tests/test_dynamic_import.html | 4 ---- dom/worklet/tests/test_exception.html | 7 ------- dom/worklet/tests/test_fetch_failed.html | 7 ------- dom/worklet/tests/test_import_with_cache.html | 7 ------- dom/worklet/tests/test_paintWorklet.html | 4 +--- dom/worklet/tests/test_promise.html | 7 ------- layout/style/crashtests/crashtests.list | 2 +- modules/libpref/init/StaticPrefList.yaml | 11 ----------- .../destination/fetch-destination.https.html.ini | 1 - .../opt-in/worklet-audio.https.html.ini | 1 - .../top.meta/opt-in/worklet-audio.https.html.ini | 1 - .../top.meta/unset/worklet-audio.https.html.ini | 1 - .../upgrade/worklet-audio.https.html.ini | 1 - .../upgrade/worklet-audio.https.html.ini | 1 - .../upgrade/worklet-audio.https.html.ini | 1 - .../top.meta/upgrade/worklet-audio.https.html.ini | 1 - testing/web-platform/meta/webaudio/__dir__.ini | 1 - testing/web-platform/meta/worklets/__dir__.ini | 1 - 36 files changed, 20 insertions(+), 131 deletions(-) delete mode 100644 testing/web-platform/meta/webaudio/__dir__.ini diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_worker_promise_error.js b/devtools/client/webconsole/test/browser/browser_webconsole_worker_promise_error.js index 36ad8b43db4a..c895031b2643 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_worker_promise_error.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_worker_promise_error.js @@ -11,13 +11,6 @@ const TEST_URI = "test/browser/test-worker-promise-error.html"; add_task(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["dom.audioworklet.enabled", true], - ["dom.worklet.enabled", true], - ], - }); - const hud = await openNewTabAndConsole(TEST_URI); await waitFor(() => findErrorMessage(hud, "uncaught exception: worker-error") diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js b/devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js index 63b64c74b658..f17642e45741 100644 --- a/devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js +++ b/devtools/client/webconsole/test/browser/browser_webconsole_worklet_error.js @@ -11,13 +11,6 @@ const TEST_URI = "test/browser/test-error-worklet.html"; add_task(async function () { - await SpecialPowers.pushPrefEnv({ - set: [ - ["dom.audioworklet.enabled", true], - ["dom.worklet.enabled", true], - ], - }); - const hud = await openNewTabAndConsole(TEST_URI); await waitFor(() => diff --git a/dom/media/MediaTrackGraph.cpp b/dom/media/MediaTrackGraph.cpp index 65ba367a0479..0ff32e29799e 100644 --- a/dom/media/MediaTrackGraph.cpp +++ b/dom/media/MediaTrackGraph.cpp @@ -3375,8 +3375,7 @@ MediaTrackGraphImpl* MediaTrackGraphImpl::GetInstance( if (!graph) { GraphRunType runType = DIRECT_DRIVER; if (aGraphDriverRequested != OFFLINE_THREAD_DRIVER && - (StaticPrefs::dom_audioworklet_enabled() || - Preferences::GetBool("media.audiograph.single_thread.enabled", + (Preferences::GetBool("media.audiograph.single_thread.enabled", false))) { runType = SINGLE_THREAD; } diff --git a/dom/tests/mochitest/whatwg/test_structuredCloneAndExposed.html b/dom/tests/mochitest/whatwg/test_structuredCloneAndExposed.html index 15d34ebe25b3..d125de4e6b99 100644 --- a/dom/tests/mochitest/whatwg/test_structuredCloneAndExposed.html +++ b/dom/tests/mochitest/whatwg/test_structuredCloneAndExposed.html @@ -251,13 +251,7 @@ function isExposed(exposure, global) { async function runTest() { - await SpecialPowers.pushPrefEnv({ - set: [ - ["dom.audioworklet.enabled", true], - ["dom.media.webcodecs.enabled", true], - ["dom.worklet.enabled", true], - ], - }); + await SpecialPowers.pushPrefEnv({ set: [["dom.media.webcodecs.enabled", true]] }); async function testDOMClass(domClass, exposure, createObject, transferable) { for ([globalName, webidlGlobal] of globals) { diff --git a/dom/webidl/AudioParamMap.webidl b/dom/webidl/AudioParamMap.webidl index d2e18213298e..1ca8dbcc7fc0 100644 --- a/dom/webidl/AudioParamMap.webidl +++ b/dom/webidl/AudioParamMap.webidl @@ -10,8 +10,7 @@ * liability, trademark and document use rules apply. */ -[SecureContext, Pref="dom.audioworklet.enabled", - Exposed=Window] +[SecureContext, Exposed=Window] interface AudioParamMap { readonly maplike; }; diff --git a/dom/webidl/AudioWorklet.webidl b/dom/webidl/AudioWorklet.webidl index 32e48facb3c6..92d566f6d6fc 100644 --- a/dom/webidl/AudioWorklet.webidl +++ b/dom/webidl/AudioWorklet.webidl @@ -10,6 +10,6 @@ * liability, trademark and document use rules apply. */ -[Exposed=Window, SecureContext, Pref="dom.audioworklet.enabled"] +[Exposed=Window, SecureContext] interface AudioWorklet : Worklet { }; diff --git a/dom/webidl/AudioWorkletNode.webidl b/dom/webidl/AudioWorkletNode.webidl index 929d4f928175..a7e48c9c7b50 100644 --- a/dom/webidl/AudioWorkletNode.webidl +++ b/dom/webidl/AudioWorkletNode.webidl @@ -19,8 +19,7 @@ dictionary AudioWorkletNodeOptions : AudioNodeOptions { object processorOptions; }; -[SecureContext, Pref="dom.audioworklet.enabled", - Exposed=Window] +[SecureContext, Exposed=Window] interface AudioWorkletNode : AudioNode { [Throws] constructor(BaseAudioContext context, DOMString name, diff --git a/dom/webidl/BaseAudioContext.webidl b/dom/webidl/BaseAudioContext.webidl index 509f039684e0..7bdd15ddfc58 100644 --- a/dom/webidl/BaseAudioContext.webidl +++ b/dom/webidl/BaseAudioContext.webidl @@ -26,7 +26,7 @@ interface BaseAudioContext : EventTarget { readonly attribute double currentTime; readonly attribute AudioListener listener; readonly attribute AudioContextState state; - [Throws, SameObject, SecureContext, Pref="dom.audioworklet.enabled"] + [Throws, SameObject, SecureContext] readonly attribute AudioWorklet audioWorklet; [NewObject] diff --git a/dom/webidl/Worklet.webidl b/dom/webidl/Worklet.webidl index d87742dfa3f2..ba5244e7fc77 100644 --- a/dom/webidl/Worklet.webidl +++ b/dom/webidl/Worklet.webidl @@ -7,8 +7,7 @@ * https://drafts.css-houdini.org/worklets/#idl-index */ -[SecureContext, Pref="dom.worklet.enabled", - Exposed=Window] +[SecureContext, Exposed=Window] interface Worklet { [NewObject, Throws, NeedsCallerType] Promise addModule(USVString moduleURL, optional WorkletOptions options = {}); diff --git a/dom/worklet/tests/common.js b/dom/worklet/tests/common.js index df6005cfe47d..3841a5f73b4d 100644 --- a/dom/worklet/tests/common.js +++ b/dom/worklet/tests/common.js @@ -1,13 +1,16 @@ -window.onload = function () { +window.onload = async function () { // We are the parent. Let's load the test. if (parent == this || !location.search.includes("worklet_iframe")) { SimpleTest.waitForExplicitFinish(); - configureTest().then(() => { - var iframe = document.createElement("iframe"); - iframe.src = location.href + "?worklet_iframe"; - document.body.appendChild(iframe); - }); + // configureTest is optional + if (window.configureTest) { + await window.configureTest(); + } + + var iframe = document.createElement("iframe"); + iframe.src = location.href + "?worklet_iframe"; + document.body.appendChild(iframe); return; } diff --git a/dom/worklet/tests/test_audioWorklet.html b/dom/worklet/tests/test_audioWorklet.html index f7f3665e2f8b..d792f2d782db 100644 --- a/dom/worklet/tests/test_audioWorklet.html +++ b/dom/worklet/tests/test_audioWorklet.html @@ -34,10 +34,6 @@ function configureTest() { } var cl = new consoleListener(); - - return SpecialPowers.pushPrefEnv( - {"set": [["dom.audioworklet.enabled", true], - ["dom.worklet.enabled", true]]}); } // This function is called into an iframe. diff --git a/dom/worklet/tests/test_audioWorkletGlobalScopeRegisterProcessor.html b/dom/worklet/tests/test_audioWorkletGlobalScopeRegisterProcessor.html index c26df05ad090..de0188b542a0 100644 --- a/dom/worklet/tests/test_audioWorkletGlobalScopeRegisterProcessor.html +++ b/dom/worklet/tests/test_audioWorkletGlobalScopeRegisterProcessor.html @@ -59,10 +59,6 @@ function configureTest() { } var cl = new consoleListener(); - - return SpecialPowers.pushPrefEnv( - {"set": [["dom.audioworklet.enabled", true], - ["dom.worklet.enabled", true]]}); } // This function is called into an iframe. diff --git a/dom/worklet/tests/test_audioWorklet_WASM.html b/dom/worklet/tests/test_audioWorklet_WASM.html index 127cc8b9245a..01804651184d 100644 --- a/dom/worklet/tests/test_audioWorklet_WASM.html +++ b/dom/worklet/tests/test_audioWorklet_WASM.html @@ -12,8 +12,7 @@ function configureTest() { return SpecialPowers.pushPrefEnv( - {"set": [["dom.audioworklet.enabled", true], - ["dom.worklet.enabled", true], + {"set": [ ["dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled", true], ["browser.tabs.remote.useCrossOriginOpenerPolicy", true], ["browser.tabs.remote.useCrossOriginEmbedderPolicy", true], diff --git a/dom/worklet/tests/test_audioWorklet_insecureContext.html b/dom/worklet/tests/test_audioWorklet_insecureContext.html index 3cbb419ac399..ac27578b7c16 100644 --- a/dom/worklet/tests/test_audioWorklet_insecureContext.html +++ b/dom/worklet/tests/test_audioWorklet_insecureContext.html @@ -9,13 +9,6 @@