Closed Bug 1832326 Opened 2 years ago Closed 2 years ago

Remove BodyStreamHolder::MarkAsRead

Categories

(Core :: DOM: Streams, task)

task

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: saschanaz, Assigned: saschanaz)

References

Details

Attachments

(2 files)

No description provided.
Depends on: 1832333
  1. NullifyStream has been there forever since bug 1128959 probably to release the underlying source early, but that purpose is now fulfilled internally in dom/streams by ReadableStreamController::ClearAlgorithms which calls BodyStreamUnderlyingSourceAlgorithms::ReleaseObjects.
  2. FetchBody currently has two source of truth for bodyUsed but per the spec it should just refer to ReadableStream::Disturbed(). Removing mBodyUsed would be more complex as there are several SetBodyUsed calls here and there, so this is only the first step to reduce the use of its own field but use the ReadableStream info directly.
Attachment #9333328 - Attachment description: Bug 1832326 - Remove BodyStreamHolder::NullifyStream()/MarkAsRead() r=smaug → Bug 1832326 - Part 1: Remove BodyStreamHolder::NullifyStream()/MarkAsRead() r=smaug

FetchBody does nothing with the strong reference. Both ReadableStream and FetchStreamReader have their strong references and corresponding cycle collection, so this one can go away.

Depends on D177904

Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/955b1743858a Part 1: Remove BodyStreamHolder::NullifyStream()/MarkAsRead() r=smaug https://hg.mozilla.org/integration/autoland/rev/f1576a86a535 Part 2: Remove FetchBody::mReadableStreamReader r=smaug
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Regressions: 1835390
Regressions: 1865728
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: