Closed Bug 1341609 Opened 4 years ago Closed 3 years ago

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


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




Tracking Status
firefox58 --- fixed


(Reporter: annevk, Assigned: wisniewskit)



(1 file)

Test: In particular we should fail in the network stack instead, with a network error.

Related discussion:
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):
Comment on attachment 8913482 [details]
Bug 1341609 - Don't throw on async XHR send() failures when open() created no channel;

::: 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
Don't throw on async XHR send() failures when open() created no channel; r=baku
Keywords: checkin-needed
Closed: 3 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.