Closed Bug 1251627 Opened 10 years ago Closed 10 years ago

Fix the exceptions XMLHttpRequest (XHR) send() throws to follow the spec more

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Keywords: dev-doc-needed, Whiteboard: btpp-active)

Attachments

(1 file)

We should not be throwing NS_ERROR_FAILURE from DOM APIs. Really, we should not.
Blocks: 1251697
Comment on attachment 8724139 [details] [diff] [review] Fix XMLHttpRequest.send() to follow the spec better in terms of the exceptions it throws Review of attachment 8724139 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/workers/XMLHttpRequest.cpp @@ +2282,5 @@ > > + if (mStateData.mReadyState == 4) { > + // No one did anything to us while we fired abort events, so reset our state > + // to "unsent" > + mStateData.mReadyState = 0; https://xhr.spec.whatwg.org/#the-abort%28%29-method says to do this unconditionally, no?
Attachment #8724139 - Flags: review?(khuey) → review+
Whiteboard: btpp-active
> https://xhr.spec.whatwg.org/#the-abort%28%29-method says to do this unconditionally, no? It does, but I think it's bogus. I filed https://github.com/whatwg/xhr/issues/54 earlier today, with a testcase and an explanation of why I think the spec behavior in that testcase is bogus...
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: