Closed
Bug 707256
Opened 13 years ago
Closed 12 years ago
abort event listener no longer called on nsIXMLHttpRequest
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: irakli, Unassigned)
References
Details
In jetpack we observe regression on nightlies with nsIXMLHttpRequest, abort event listeners are no longer called when requests are aborted. Here is a simple test case: var aborted = false; var xhr = Components.classes['@mozilla.org/xmlextras/xmlhttprequest;1']. createInstance(Ci.nsIXMLHttpRequest); xhr.addEventListener('abort', function() { aborted = true }, false); aborted // is false (on nightly) while expected to be true
Reporter | ||
Updated•13 years ago
|
Comment 1•13 years ago
|
||
Regression range?
Component: Networking: HTTP → DOM
QA Contact: networking.http → general
Reporter | ||
Comment 2•13 years ago
|
||
I don't know when regression has been introduced, but it seems to work as expected on aurora.
Comment 3•13 years ago
|
||
Commit pushed to https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/8a927261d7fd06bf0c5a1ae62f2b236ca8305bad Disable failing XHR test until platform bug 707256 is fixed.
Comment 4•13 years ago
|
||
> I don't know when regression has been introduced, Are you willing to figure that out using http://harthur.github.com/mozregression/ ?
Comment 5•13 years ago
|
||
We had a recent change to abort event dispatch in bug 703380. That bug was about abort events firing after a load or error event fired, which is incorrect behavior. Could this be related to that?
Comment 6•13 years ago
|
||
Yeah, I think it's definitely related. The XHR2 spec states that if the request is in an UNSENT state, then the event should not be fired: http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-abort-method The testcase in comment 3 does not reflect that: it checks the event count before and after the abort call, but send is never called.
Comment 7•13 years ago
|
||
Here's your regression: https://hg.mozilla.org/integration/mozilla-inbound/rev/d3b066c050d3
Comment 8•13 years ago
|
||
Yeah, it's intentional and expected that "abort" event will not be fired in UNSENT state. The test should be fixed.
Component: DOM → General
Product: Core → Add-on SDK
QA Contact: general → general
Version: Trunk → unspecified
Comment 9•13 years ago
|
||
Commit pushed to https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/604069d1d7277025b062372682da5e02a8be04fd Disable failing XHR test until platform bug 707256 is fixed.(cherry picked from commit 8a927261d7fd06bf0c5a1ae62f2b236ca8305bad)
Priority: -- → P2
Comment 10•13 years ago
|
||
Commit pushed to https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/604069d1d7277025b062372682da5e02a8be04fd Disable failing XHR test until platform bug 707256 is fixed.(cherry picked from commit 8a927261d7fd06bf0c5a1ae62f2b236ca8305bad)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•