Closed
Bug 802551
Opened 12 years ago
Closed 9 years ago
onHTTPSpyReadyStateChange not sent for aborted XHR
Categories
(Core :: Networking: HTTP, defect)
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
Reporter | ||
Updated•12 years ago
|
Whiteboard: [firebug-p1]
Updated•12 years ago
|
Component: Networking → Networking: HTTP
Reporter | ||
Comment 1•12 years ago
|
||
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
Reporter | ||
Comment 2•12 years ago
|
||
Patrick, could http://hg.mozilla.org/mozilla-central/rev/6ee4101a85f3 be the problem here?
Honza
Comment 3•12 years ago
|
||
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.
Reporter | ||
Comment 4•12 years ago
|
||
(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
Comment 5•12 years ago
|
||
onreadystatechange should not be a networking issue.
Can you find a one-day regression range here?
Reporter | ||
Comment 6•12 years ago
|
||
(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
Comment 7•12 years ago
|
||
Ah, indeed. At what point does Firebug add its onreadystatechange listener?
Reporter | ||
Comment 8•12 years ago
|
||
(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
Comment 9•12 years ago
|
||
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
Reporter | ||
Comment 10•12 years ago
|
||
(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
Updated•9 years ago
|
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.
Description
•