Closed Bug 802551 Opened 10 years ago Closed 7 years ago
HTTPSpy Ready State Change not sent for aborted XHR
One of the Firebug automated tests is using following script to check that XHR displayed in the Console panel (and the Net panel) is properly finished if aborted: var request = new XMLHttpRequest(); request.open("POST", "<my-url>", true); request.send(null); request.abort(); It works in Firefox 17, where onHTTPSpyReadyStateChange (state 1 and 4) is executed for the request and ACTIVITY_SUBTYPE_REQUEST_HEADER, ACTIVITY_SUBTYPE_RESPONSE_COMPLETE and ACTIVITY_SUBTYPE_TRANSACTION_CLOSE events sent by nsIActivityDistributor - so, Firebug know that the request has finished (and aborted). However it doesn't work in Firefox 19 where onHTTPSpyReadyStateChange is not executed and no events from nsIActivityDistributor received. This seems to be a regression Honza
10 years ago
Component: Networking → Networking: HTTP
WORKS Built from http://hg.mozilla.org/mozilla-central/rev/aa5e3b445810 DOES NOT WORK Built from http://hg.mozilla.org/mozilla-central/rev/ec10630b1a54 Regression range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=aa5e3b445810&tochange=ec10630b1a54 Honza
Patrick, could http://hg.mozilla.org/mozilla-central/rev/6ee4101a85f3 be the problem here? Honza
what is onHTTPSpyReadyStateChange ? (It doesn't appear in mxr) as far as the activity notifications - if the events didn't occur because of the abort, why would the notifications occur? If xhr makes some guarantee more than than http does then the dom folks should look at it, but I don't think it does.
(In reply to Patrick McManus [:mcmanus] from comment #3) > what is onHTTPSpyReadyStateChange ? (It doesn't appear in mxr) Sorry, I meant onReadyStateChange callback of XHR object. > as far as the activity notifications - if the events didn't occur because of > the abort, why would the notifications occur? > > If xhr makes some guarantee more than than http does then the dom folks > should look at it, but I don't think it does. But the onReadyStateChange callback should be called if the request is aborted, no? (see the code example in comment #0) STR: 1) Install Firebug: https://getfirebug.com/releases/firebug/1.11/firebug-1.11.0a4.xpi 2) Load: https://getfirebug.com/tests/head/console/spy/2462/issue2462.html 3) Follow instructions on the page. Honza
onreadystatechange should not be a networking issue. Can you find a one-day regression range here?
(In reply to Boris Zbarsky (:bz) from comment #5) > onreadystatechange should not be a networking issue. > > Can you find a one-day regression range here? See comment #1 Honza
Ah, indeed. At what point does Firebug add its onreadystatechange listener?
(In reply to Boris Zbarsky (:bz) from comment #7) > At what point does Firebug add its onreadystatechange listener? Within "http-on-modify-request" handler Honza
Ah, then yes, this could be bug 797684. As in, the abort could be happening before the notification is ever sent, so you're never adding your listener. Presumably the fix for bug 800799 will address this.
(In reply to Boris Zbarsky (:bz) from comment #9) > Presumably the fix for bug 800799 will address this. Yep, that's what I was hoping for. Thanks, Boris! Honza
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.