Closed Bug 1341609 Opened 7 years ago Closed 7 years ago

Revoked blob URL should not cause XMLHttpRequest's open() to throw

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: annevk, Assigned: wisniewskit)

Details

Attachments

(1 file)

Test: http://w3c-test.org/FileAPI/blob/Blob-XHR-revoke.html. In particular we should fail in the network stack instead, with a network error.

Related discussion: https://github.com/whatwg/xhr/issues/79.
baku, will this be hard to change? Is there a past-Gecko-compat risk?
Flags: needinfo?(amarchesini)
We actually seem to be doing the right thing, except that we end up throwing the network error in send() rather than triggering an onerror (for async requests). I'll create a patch to correct that behavior.
Assignee: nobody → wisniewskit
I've just attached a patch which makes the async case trigger an onerror instead of throwing an exception. It seems to pass try (there are a couple of intermittents there which worried me at first, but seem unrelated): https://treeherder.mozilla.org/#/jobs?repo=try&revision=9564b70ab1d1a95e52e638a5ef13c7e6b8c80034
Comment on attachment 8913482 [details]
Bug 1341609 - Don't throw on async XHR send() failures when open() created no channel;

https://reviewboard.mozilla.org/r/184824/#review190050

::: dom/xhr/XMLHttpRequestMainThread.cpp:2936
(Diff revision 1)
>      return;
>    }
>  }
>  
>  nsresult
> +XMLHttpRequestMainThread::MaybeSilentSendFailure(nsresult aRv) {

{ in a new line
Attachment #8913482 - Flags: review?(amarchesini) → review+
Flags: needinfo?(amarchesini)
Review comments addressed, requesting checkin.
Keywords: checkin-needed
Priority: -- → P2
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/36eab49a7d10
Don't throw on async XHR send() failures when open() created no channel; r=baku
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/36eab49a7d10
Status: NEW → RESOLVED
Closed: 7 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.