Closed
Bug 1353684
Opened 7 years ago
Closed 7 years ago
nsIFileInputStream must return NS_ERROR_NOT_FOUND if Deserialize() fails.
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
References
Details
Attachments
(1 file, 2 obsolete files)
16.26 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Currently, if a non-existing file is deserialized, we create a nsIFileInputStream with a null mFD. If we do a Read() on this file, we receive a NS_BASE_STREAM_CLOSED instead of NS_ERROR_FILE_NOT_FOUND.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8854783 -
Flags: review?(ehsan)
Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8854783 -
Attachment is obsolete: true
Attachment #8854783 -
Flags: review?(ehsan)
Attachment #8854806 -
Flags: review?(ehsan)
Assignee | ||
Comment 3•7 years ago
|
||
Attachment #8854806 -
Attachment is obsolete: true
Attachment #8854806 -
Flags: review?(ehsan)
Attachment #8859929 -
Flags: review?(bugs)
Comment 4•7 years ago
|
||
Comment on attachment 8859929 [details] [diff] [review] fileInputStream_NOT_FOUND.patch > nsFileInputStream::Init(nsIFile* aFile, int32_t aIOFlags, int32_t aPerm, > int32_t aBehaviorFlags) > { > NS_ENSURE_TRUE(!mFD, NS_ERROR_ALREADY_INITIALIZED); >- NS_ENSURE_TRUE(!mDeferredOpen, NS_ERROR_ALREADY_INITIALIZED); >+ NS_ENSURE_TRUE(mState == eUnitialized || mState == eClosed, >+ NS_ERROR_ALREADY_INITIALIZED); ok, this changes behavior of the edge case when there was an error, but I guess that is fine. >+ // Something bad happen in the Open() or in Deserialize(). See >+ // mErrorValue. s/happen/happened/ "See mErrorValue" is rather odd comment when mErrorValue isn't document at all. Perhaps you mean something like "The actual error value is stored in mErrorValue"-
Attachment #8859929 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/daed4710bbf1 nsIFileInputStream must return NS_ERROR_NOT_FOUND if Deserialize() fails, r=smaug
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/daed4710bbf1
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•