Bug 1759597 - Enable WritableStreams and pipeTo by default r=smaug

* TextEncoder stream tests now fail, rather than error
* WritableStreams are exosed on worker interfacess now; and broken-then is fixed too
* Fix interface semantics

Differential Revision: https://phabricator.services.mozilla.com/D141125
This commit is contained in:
Matthew Gaudet 2022-03-22 20:33:04 +00:00
parent 0a979b5726
commit 6450bc232b
10 changed files with 55 additions and 45 deletions

View File

@ -309,6 +309,11 @@ var interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
"WorkerNavigator",
// IMPORTANT: Do not change this list without review from a DOM peer!
"WritableStream",
// IMPORTANT: Do not change this list without review from a DOM peer!
"WritableStreamDefaultController",
// IMPORTANT: Do not change this list without review from a DOM peer!
"WritableStreamDefaultWriter",
];
// IMPORTANT: Do not change the list above without review from a DOM peer!

View File

@ -1370,6 +1370,12 @@ var interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "Worklet", insecureContext: false },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WritableStream", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WritableStreamDefaultController", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WritableStreamDefaultWriter", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "XMLDocument", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "XMLHttpRequest", insecureContext: true },

View File

@ -333,6 +333,12 @@ var interfaceNamesInGlobalScope = [
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WorkerNavigator", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WritableStream", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WritableStreamDefaultController", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "WritableStreamDefaultWriter", insecureContext: true },
// IMPORTANT: Do not change this list without review from a DOM peer!
];
// IMPORTANT: Do not change the list above without review from a DOM peer!

View File

@ -3674,7 +3674,7 @@
- name: dom.streams.writable_streams.enabled
type: RelaxedAtomicBool
value: false
value: true
mirror: always
- name: dom.streams.transform_streams.enabled
@ -3684,7 +3684,7 @@
- name: dom.streams.pipeTo.enabled
type: RelaxedAtomicBool
value: false
value: true
mirror: always
# For area and anchor elements with target=_blank and no rel set to

View File

@ -1,2 +1,36 @@
[realms.window.html]
expected: ERROR
[a TextEncoderStream object should be associated with the realm the constructor came from]
expected: FAIL
[TextEncoderStream's readable and writable attributes should come from the same realm as the constructor definition]
expected: FAIL
[the output chunks when read is called after write should come from the same realm as the constructor of TextEncoderStream]
expected: FAIL
[the output chunks when write is called with a pending read should come from the same realm as the constructor of TextEncoderStream]
expected: FAIL
[TypeError for unconvertable chunk should come from constructor realm of TextEncoderStream]
expected: FAIL
[a TextDecoderStream object should be associated with the realm the constructor came from]
expected: FAIL
[TextDecoderStream's readable and writable attributes should come from the same realm as the constructor definition]
expected: FAIL
[the result object when read is called after write should come from the same realm as the constructor of TextDecoderStream]
expected: FAIL
[the result object when write is called with a pending read should come from the same realm as the constructor of TextDecoderStream]
expected: FAIL
[TypeError for chunk with the wrong type should come from constructor realm of TextDecoderStream]
expected: FAIL
[TypeError for invalid chunk should come from constructor realm of TextDecoderStream]
expected: FAIL
[TypeError for incomplete input should come from constructor realm of TextDecoderStream]
expected: FAIL

View File

@ -2,30 +2,17 @@
[using pipeThrough on Response body should disturb it synchronously]
expected: FAIL
[using pipeTo on Response body should disturb it synchronously]
expected: FAIL
[response-stream-disturbed-by-pipe.any.worker.html]
[using pipeThrough on Response body should disturb it synchronously]
expected: FAIL
[using pipeTo on Response body should disturb it synchronously]
expected: FAIL
[response-stream-disturbed-by-pipe.any.serviceworker.html]
[using pipeThrough on Response body should disturb it synchronously]
expected: FAIL
[using pipeTo on Response body should disturb it synchronously]
expected: FAIL
[response-stream-disturbed-by-pipe.any.sharedworker.html]
[using pipeThrough on Response body should disturb it synchronously]
expected: FAIL
[using pipeTo on Response body should disturb it synchronously]
expected: FAIL

View File

@ -1,19 +0,0 @@
[response-stream-with-broken-then.any.html]
[intercepting arraybuffer to body readable stream conversion via Object.prototype.then should not be possible]
expected: FAIL
[response-stream-with-broken-then.any.worker.html]
[intercepting arraybuffer to body readable stream conversion via Object.prototype.then should not be possible]
expected: FAIL
[response-stream-with-broken-then.any.serviceworker.html]
[intercepting arraybuffer to body readable stream conversion via Object.prototype.then should not be possible]
expected: FAIL
[response-stream-with-broken-then.any.sharedworker.html]
[intercepting arraybuffer to body readable stream conversion via Object.prototype.then should not be possible]
expected: FAIL

View File

@ -1 +1 @@
prefs: [javascript.options.streams:true, dom.streams.byte_streams.enabled:true, dom.streams.writable_streams.enabled:true, dom.streams.transform_streams.enabled:true, dom.streams.pipeTo.enabled:true]
prefs: [javascript.options.streams:true, dom.streams.byte_streams.enabled:true, dom.streams.transform_streams.enabled:true, dom.streams.pipeTo.enabled:true]

View File

@ -20,9 +20,6 @@
[The CanvasPath interface object should be exposed.]
expected: FAIL
[The WritableStream interface object should be exposed.]
expected: FAIL
[001.worker.html]
[The SharedWorker interface object should be exposed.]
@ -31,9 +28,6 @@
[The CanvasPath interface object should be exposed.]
expected: FAIL
[The WritableStream interface object should be exposed.]
expected: FAIL
[The TextMetrics interface object should be exposed.]
expected: FAIL

View File

@ -8,6 +8,3 @@
[The ApplicationCache interface object should be exposed]
expected: FAIL
[The WritableStream interface object should be exposed]
expected: FAIL