Closed
Bug 778002
Opened 12 years ago
Closed 12 years ago
Identity should createInstance XHR, not getService it
Categories
(Core Graveyard :: Identity, defect)
Core Graveyard
Identity
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla17
People
(Reporter: khuey, Unassigned)
Details
Attachments
(1 file)
1.06 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/mozilla-central/source/toolkit/identity/Identity.jsm#257 256 // this appears to be a more successful way to get at xmlhttprequest (which supposedly will close with a window 257 let req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"] 258 .getService(Ci.nsIXMLHttpRequest); This is bad because you'll get the same XHR everytime. If some other code (say an addon) does the same thing you'll cross the streams, and you could start getting load events fired for a totally different request.
Comment 1•12 years ago
|
||
And that would mean total protonic reversal. Wow - thanks for catching this. I had no idea getService returned a singleton. But now I've found this: https://developer.mozilla.org/en/Components.classes and will update the code accordingly. Thanks again, j.
Comment 2•12 years ago
|
||
Hi, Kyle, Is this correct? Thanks, j
Attachment #646632 -
Flags: review?(khuey)
Reporter | ||
Comment 3•12 years ago
|
||
Comment on attachment 646632 [details] [diff] [review] Use createInstance to get a new, not singleton, XHR instance on each invocation Review of attachment 646632 [details] [diff] [review]: ----------------------------------------------------------------- Yep.
Attachment #646632 -
Flags: review?(khuey) → review+
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f6f7358234b3
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Updated•5 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•