Closed Bug 802551 Opened 12 years ago Closed 9 years ago

onHTTPSpyReadyStateChange not sent for aborted XHR

Categories

(Core :: Networking: HTTP, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 800799

People

(Reporter: Honza, Unassigned)

References

Details

(Whiteboard: [firebug-p1])

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
Whiteboard: [firebug-p1]
Component: Networking → Networking: HTTP
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.
Blocks: 797684
(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: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.