Closed Bug 1412822 Opened 4 years ago Closed 4 years ago

MutableBlobStorage should release the FileDescriptor when an error occurs

Categories

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

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(1 file)

This is a follow up of bug 1411578.
Attached patch mutable2.patchSplinter Review
If we don't release the FD before sending the last message to the parent actor, this actor will not be able to remove the temporary file on windows.
Assignee: nobody → amarchesini
Attachment #8923358 - Flags: review?(bugs)
Depends on: 1411578
For MediaRecorder it looks like an error in MutableBlobStorage is not propagated to the recorder until the recorder asks for a blob (which could be hours later once the recording is finished). We'd need to get informed as soon as possible. Thoughts on fixing this baku?
Flags: needinfo?(amarchesini)
Comment on attachment 8923358 [details] [diff] [review]
mutable2.patch

># HG changeset patch
># User Andrea Marchesini <amarchesini@mozilla.com>
># Parent  83996ad23d5057b632dc653880123cb8d2d26b4c
>
>diff --git a/dom/file/MutableBlobStorage.cpp b/dom/file/MutableBlobStorage.cpp
>--- a/dom/file/MutableBlobStorage.cpp
>+++ b/dom/file/MutableBlobStorage.cpp
>@@ -100,86 +100,84 @@ private:
> };
> 
> // This runnable moves a buffer to the IO thread and there, it writes it into
> // the temporary file.
please improve this to indicate that the file may be closed too, since closing is 
a bit surprising result of this runnable
Attachment #8923358 - Flags: review?(bugs) → review+
> [...] soon as possible. Thoughts on fixing this baku?

Right! Let's do it in a separate bug.
Flags: needinfo?(amarchesini)
Blocks: 1412894
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e064bf3ca8e1
MutableBlobStorage should release the FileDescriptor when an error occurs, r=smaug
https://hg.mozilla.org/mozilla-central/rev/e064bf3ca8e1
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Blocks: 1411578
No longer depends on: 1411578
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.