nsXMLHttpRequest::SetRequestHeader should check mState instead of GetReadyState

VERIFIED FIXED in Firefox 7

Status

()

Core
DOM
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: jdm, Assigned: jdm)

Tracking

({regression})

Trunk
mozilla8
x86
Mac OS X
regression
Points:
---

Firefox Tracking Flags

(firefox7+ fixed)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Updated

6 years ago
Assignee: nobody → josh
(Assignee)

Updated

6 years ago
Blocks: 553888
(Assignee)

Comment 1

6 years ago
Created attachment 548297 [details] [diff] [review]
Check the correct condition when setting a header on an XHR.
Attachment #548297 - Flags: review?(jonas)
Attachment #548297 - Flags: review?(jonas) → review+
(Assignee)

Comment 2

6 years ago
This is going to need to go on aurora as well. Marking the tracking flag to help me not forget about it after pushing to m-c.
tracking-firefox7: --- → ?
(Assignee)

Comment 3

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/0b9909535cc0
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/0b9909535cc0
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8

Comment 5

6 years ago
This is a regression from bug 553888, correct?
tracking-firefox7: ? → +
Keywords: regression
(Assignee)

Comment 6

6 years ago
Yes.

Comment 7

6 years ago
Is there a way this fix can be verified by QA? If so, please help me with some test case/STR/guidelines.

Thank you
(Assignee)

Comment 8

6 years ago
There's a test present in the patch that is currently passing. You could try replicating that (ensure that calling xhr.setRequestHeader("foo") throws after calling xhr.send()) if you wanted.

Comment 9

6 years ago
To verify this issue open the link from comment #4. It is obvious from the code changes that mState is now checked instead of GetReadyState 
(1.12 -  PRUint16 state;
 1.13 -  rv = GetReadyState(&state);
 1.14 -  if (NS_FAILED(rv) || state != OPENED)
 1.15 +  if (!(mState & XML_HTTP_REQUEST_OPENED))
...).
Status: RESOLVED → VERIFIED

Comment 10

6 years ago
http://hg.mozilla.org/releases/mozilla-beta/rev/dd9ba894c28b

(it is already on aurora 8)
status-firefox7: --- → fixed
You need to log in before you can comment on or make changes to this bug.