Impossible to create ReadableStream in a content script
Categories
(Core :: DOM: Streams, defect)
Tracking
()
People
(Reporter: firefboxer, Unassigned)
Details
Attachments
(1 file)
588 bytes,
application/x-7z-compressed
|
Details |
Steps to reproduce:
I created ReadableStream in a content script
try {
const readableStream = new ReadableStream({
async start(controller) {
controller.enqueue(new Uint8Array([116, 101, 120, 116]));
controller.close();
}
});
new Response(readableStream).text().then(console.log);
} catch (e) {
console.error(e);
}
Actual results:
Error: Permission denied to access property "autoAllocateChunkSize"
Expected results:
The console should log "text".
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
To reproduce the bug install the extension from the attached archive, then open a console on any site.
It works fine in Firefox 91.10.0esr.
But, it does not work in Firefox 100.0.2.
In Firefox 100 it throws the error:
Error: Permission denied to access property "autoAllocateChunkSize"
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
I am not sure if this is just supposed to be an example, but a better way to implement this would be:
new Blob(new Uint8Array([116, 101, 120, 116])).text().then(console.log)
It's just an example.
I really need ReadableStream
to stream data from the background script to the content script which will work with a ReadableStream
object in stream way.
Description
•