Bug 1630497 - Remove dom.audioworklet.enabled and dom.worklet.enabled prefs r=padenot,webidl,saschanaz

Differential Revision: https://phabricator.services.mozilla.com/D183645
This commit is contained in:
Gregory Pappas 2023-07-19 12:41:18 +00:00
parent 6934f07e3f
commit 15a5560a3d
36 changed files with 20 additions and 131 deletions

View File

@ -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")

View File

@ -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(() =>

View File

@ -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;
}

View File

@ -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) {

View File

@ -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<DOMString, AudioParam>;
};

View File

@ -10,6 +10,6 @@
* liability, trademark and document use rules apply.
*/
[Exposed=Window, SecureContext, Pref="dom.audioworklet.enabled"]
[Exposed=Window, SecureContext]
interface AudioWorklet : Worklet {
};

View File

@ -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,

View File

@ -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]

View File

@ -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<undefined> addModule(USVString moduleURL, optional WorkletOptions options = {});

View File

@ -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;
}

View File

@ -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.

View File

@ -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.

View File

@ -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],

View File

@ -9,13 +9,6 @@
<body>
<script type="application/javascript">
function configureTest() {
return SpecialPowers.pushPrefEnv(
{"set": [["dom.audioworklet.enabled", true],
["dom.worklet.enabled", true]]});
}
// This function is called into an iframe.
function runTestInIframe() {
ok(!window.isSecureContext, "Test should run in an insecure context");

View File

@ -11,8 +11,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],

View File

@ -9,13 +9,6 @@
<body>
<script type="application/javascript">
function configureTest() {
return SpecialPowers.pushPrefEnv(
{"set": [["dom.audioworklet.enabled", true],
["dom.worklet.enabled", true]]});
}
// This function is called into an iframe.
function runTestInIframe() {
var audioContext = new AudioContext();

View File

@ -37,10 +37,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.

View File

@ -9,13 +9,6 @@
<body>
<script type="application/javascript">
function configureTest() {
return SpecialPowers.pushPrefEnv(
{"set": [["dom.audioworklet.enabled", true],
["dom.worklet.enabled", true]]});
}
// This function is called into an iframe.
function runTestInIframe() {
var audioContext = new AudioContext();

View File

@ -37,10 +37,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.

View File

@ -9,13 +9,6 @@
<body>
<script type="application/javascript">
function configureTest() {
return SpecialPowers.pushPrefEnv(
{"set": [["dom.audioworklet.enabled", true],
["dom.worklet.enabled", true]]});
}
// This function is called into an iframe.
function runTestInIframe() {
let error;

View File

@ -9,13 +9,6 @@
<body>
<script type="application/javascript">
function configureTest() {
return SpecialPowers.pushPrefEnv(
{"set": [["dom.audioworklet.enabled", true],
["dom.worklet.enabled", true]]});
}
// This function is called into an iframe.
function runTestInIframe() {
var audioContext = new AudioContext();

View File

@ -9,13 +9,6 @@
<body>
<script type="application/javascript">
function configureTest() {
return SpecialPowers.pushPrefEnv(
{"set": [["dom.audioworklet.enabled", true],
["dom.worklet.enabled", true]]});
}
// This function is called into an iframe.
function runTestInIframe() {
var audioContext = new AudioContext();

View File

@ -35,9 +35,7 @@ function configureTest() {
var cl = new consoleListener();
return SpecialPowers.pushPrefEnv(
{"set": [["dom.paintWorklet.enabled", true],
["dom.worklet.enabled", true]]});
return SpecialPowers.pushPrefEnv({ "set": [["dom.paintWorklet.enabled", true]] });
}
// This function is called into an iframe.

View File

@ -9,13 +9,6 @@
<body>
<script type="application/javascript">
function configureTest() {
return SpecialPowers.pushPrefEnv(
{"set": [["dom.audioworklet.enabled", true],
["dom.worklet.enabled", true]]});
}
function runTestInIframe() {
if (!SpecialPowers.Cu.getJSTestingFunctions().wasmIsSupported()) {
SimpleTest.finish();

View File

@ -310,7 +310,7 @@ load 1566684.html
load 1579788.html
load 1580307.html
load 1581579.html
skip-if(release_or_beta) pref(dom.paintWorklet.enabled,true) pref(dom.worklet.enabled,true) load 1593766.html # bug 1581896
skip-if(release_or_beta) pref(dom.paintWorklet.enabled,true) load 1593766.html # bug 1581896
pref(layout.css.motion-path.enabled,true) load 1594949.html
pref(layout.css.motion-path.enabled,true) pref(layout.css.individual-transform.enabled,true) load 1594960.html
load 1586444.html

View File

@ -2233,12 +2233,6 @@
value: @IS_NOT_NIGHTLY_BUILD@
mirror: always
# Is support for AudioWorklet enabled?
- name: dom.audioworklet.enabled
type: bool
value: true
mirror: always
# Is support for Navigator.getBattery enabled?
- name: dom.battery.enabled
type: bool
@ -4755,11 +4749,6 @@
value: false
mirror: always
- name: dom.worklet.enabled
type: bool
value: true
mirror: always
# When this pref is set, parent documents may consider child iframes have
# loaded while they are still loading.
- name: dom.cross_origin_iframes_loaded_in_background

View File

@ -1,5 +1,4 @@
[fetch-destination.https.html]
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
[HTMLLinkElement with rel=preload and as=audio fetches with a "audio" Request.destination]
expected: FAIL

View File

@ -1,4 +1,3 @@
[worklet-audio.https.html]
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
expected:
if (os == "android") and fission: [OK, TIMEOUT]

View File

@ -1,4 +1,3 @@
[worklet-audio.https.html]
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
expected:
if (os == "android") and fission: [OK, TIMEOUT]

View File

@ -1,4 +1,3 @@
[worklet-audio.https.html]
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
expected:
if (os == "android") and fission: [OK, TIMEOUT]

View File

@ -1,4 +1,3 @@
[worklet-audio.https.html]
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
expected:
if (os == "android") and fission: [OK, TIMEOUT]

View File

@ -1,5 +1,4 @@
[worklet-audio.https.html]
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
expected:
if (os == "linux") and not fission and not debug: [OK, CRASH]
if (os == "android") and fission: [OK, TIMEOUT]

View File

@ -1,4 +1,3 @@
[worklet-audio.https.html]
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
expected:
if (os == "android") and fission: [OK, TIMEOUT]

View File

@ -1,4 +1,3 @@
[worklet-audio.https.html]
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
expected:
if (os == "android") and fission: [OK, TIMEOUT]

View File

@ -1 +0,0 @@
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]

View File

@ -1,2 +1 @@
prefs: [dom.audioworklet.enabled:true, dom.worklet.enabled:true]
leak-threshold: [default:51200]