Closed
Bug 1514051
Opened 5 years ago
Closed 5 years ago
Release underlying source when a stream becomes closed or errored (ReadableStreamControllerClearAlgorithms)
Categories
(Core :: JavaScript Engine, enhancement, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla66
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: jorendorff, Assigned: jorendorff)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
When a ReadableStream becomes closed or errored, it doesn't need to hang on to any system resources associated with the underlying source. The standard actually specifies that the internal slots keeping it alive are nulled out. We don't yet implement this, in most code paths.
Assignee | ||
Updated•5 years ago
|
Summary: ReadableStreamControllerClearAlgorithms should release external stream sources → Release underlying source when a stream becomes closed or errored (ReadableStreamControllerClearAlgorithms)
Assignee | ||
Comment 1•5 years ago
|
||
Also in this bug: * fix ReadableStreamControllerClearAlgorithm(controller) to free external stream sources * make sure it frees the upstream source if it's a tee controller Currently it only frees anything if the stream is a pure-JS stream created with `new ReadableStream(source)`. And even then it doesn't actually free the source. Oops.
Assignee | ||
Comment 2•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a057f421627aaed52940b6cb43ecd730001a16d5
Assignee | ||
Comment 3•5 years ago
|
||
I think it's a little bizarre for this to be part of the standard, but if it weren't there, I wouldn't know it was safe to do this.
Assignee | ||
Comment 4•5 years ago
|
||
Depends on D14511
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bd071dbcecad Part 1: Drop GC edges when a stream is no longer readable. r=arai https://hg.mozilla.org/integration/autoland/rev/4b9bf0633280 Part 2: Drop the underlying source along with other GC edges in ReadableStreamControllerClearAlgorithms. r=arai
Comment 6•5 years ago
|
||
Backed out for hazard-linux64-haz bustages at Stream.cpp
Push link: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Crunnable&revision=4b9bf0633280fa3fc6994e45700d1626be970cab
Backout link: https://hg.mozilla.org/integration/autoland/rev/547d738dabfa0fc3064399a6ea1c0c950af59971
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=221810108&repo=autoland&lineNumber=53917
Flags: needinfo?(jorendorff)
Assignee | ||
Comment 7•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=dbb81878af340669753b9120a22cf2bca81dc758
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7167385d70ec Part 1: Drop GC edges when a stream is no longer readable. r=arai https://hg.mozilla.org/integration/autoland/rev/bc05036b8cbb Part 2: Drop the underlying source along with other GC edges in ReadableStreamControllerClearAlgorithms. r=arai
Comment 9•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7167385d70ec
https://hg.mozilla.org/mozilla-central/rev/bc05036b8cbb
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Assignee | ||
Updated•5 years ago
|
Flags: needinfo?(jorendorff)
You need to log in
before you can comment on or make changes to this bug.
Description
•