Expose the XMLHttpRequest (XHR) constructor in system scopes by default

ASSIGNED
Assigned to

Status

()

Core
DOM
ASSIGNED
3 years ago
25 days ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox41 affected)

Details

Attachments

(1 attachment)

It can already be imported, so there's no reason not to do it.
Hrm.  So maybe we can't do this because of addons.  :(  There's "const XMLHttpRequest" all over addon code.  :(

Mostly from "resources/api-utils/lib/self!.js" and "boostrap.js", which I think is addon SDK stuff, so _maybe_ wouldn't be an issue?  But there are some other uses too, looks like.  This is why we can't have nice things.

Once bug 589199 is fixed we can do this.
Depends on: 589199
Created attachment 8604914 [details] [diff] [review]
Patch for posterity
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Bug 589199 seems to have landed
Yeah, need to test that the way that was actually fixed for addons will still work with the "const XMLHttpRequest" stuff...  I'm not quite sure how to go about doing that, and this is pretty low-priority for me.  If someone wants to do the testing and get the patch in, please feel free to steal.
All add-ons using "const XMLHttpRequest" should have been rewritten due to global lexical scope for let/const. If not, it is already broken.

Updated

25 days ago
Duplicate of this bug: 439286
You need to log in before you can comment on or make changes to this bug.