Closed
Bug 697689
Opened 12 years ago
Closed 12 years ago
XHR broken on local filesystem
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: emk, Assigned: emk)
References
Details
(Keywords: regression)
Attachments
(2 files, 2 obsolete files)
895 bytes,
application/octet-stream
|
Details | |
1.74 KB,
patch
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. Download the attachment. 2. Open the attachment on the local volume (file:// URLs). Actual Result: error event will be fired. Oddly, .response will return Blob object despite the failure. Expected result: load event should be fired (load shouls success). This test will not fail on the network (http:// URLs).
Assignee | ||
Comment 1•12 years ago
|
||
Seekable streams will complain if OnDataAvailable succeeded but didn't consume the data. https://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsInputStreamPump.cpp#509
![]() |
||
Comment 2•12 years ago
|
||
> Seekable streams will complain if OnDataAvailable succeeded but didn't consume the data.
Not just seekable streams. The OnDataAvailable contract is very clear: if it does not consume the data it needs to throw. Says so right in the interface documentation.
Comment 3•12 years ago
|
||
My result: 3: 895/895 [object Blob] 895 7 load loadend 3: 895/895 [object Blob] 895 3 load loadend
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Rocco Stilo from comment #3) Does your build contain a patch of bug 689008? It was pushed very recently. Anyway, the current code should be fixed because it violates the nsIStreamListener contract as bz pointed out. https://mxr.mozilla.org/mozilla-central/source/netwerk/base/public/nsIStreamListener.idl#69 > * be read without blocking the calling thread. The onDataAvailable impl > * must read exactly |aCount| bytes of data before returning.
Assignee | ||
Comment 5•12 years ago
|
||
Updated a comment according to bz's advice.
Attachment #569928 -
Attachment is obsolete: true
Attachment #569928 -
Flags: review?(jonas)
Attachment #569970 -
Flags: review?(jonas)
Attachment #569928 -
Flags: review+
Attachment #569970 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #569970 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 7•12 years ago
|
||
In my queue, which is going via try then onto inbound: https://tbpl.mozilla.org/?tree=Try&rev=d3d2522ed095 Thanks :-)
Updated•12 years ago
|
Keywords: checkin-needed
Comment 8•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e331396fa1b0
Target Milestone: --- → mozilla10
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e331396fa1b0
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•