Closed Bug 1409329 Opened 2 years ago Closed 2 years ago

NS_NewBufferedOutputStream should take the ownership of the outputStream

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1409327 +++
Attached patch fix3.patchSplinter Review
Assignee: nobody → amarchesini
Attachment #8919224 - Flags: review?(bugs)
Comment on attachment 8919224 [details] [diff] [review]
fix3.patch

-    rv = NS_NewBufferedOutputStream(getter_AddRefs(mStream), stream, 64 * 1024);
+    rv = NS_NewBufferedOutputStream(getter_AddRefs(mStream), stream.forget(),
+                                    64 * 1024);
     if (NS_FAILED(rv)) {
-        stream->Close();
ok, you rely on the dtor of the stream to close.
Attachment #8919224 - Flags: review?(bugs) → review+
Priority: -- → P2
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/03e4f9175b16
NS_NewBufferedOutputStream should take the ownership of the outputStream, r=smaug
Using tryserver a tad more would save our sheriffs' valuable time, hint hint ;)
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/17c1e024efc2
NS_NewBufferedOutputStream should take the ownership of the outputStream, r=smaug
https://hg.mozilla.org/mozilla-central/rev/17c1e024efc2
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.