Closed
Bug 836448
Opened 12 years ago
Closed 12 years ago
browser-data-submission-info-bar.js pollutes the global scope
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 21
Tracking | Status | |
---|---|---|
firefox20 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
Details
Attachments
(1 file)
2.43 KB,
patch
|
Gavin
:
review+
Gavin
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
browser-data-submission-info-bar.js does a couple of things as if it didn't share the scope with lots of other chrome JS:
- it adds its own license header that ends up in the middle of browser.js
- it attempts to enable strict mode (I believe this doesn't work, since it ends up not being at the top of browser.js)
- it imports resource://services-common/log4moz.js into the global scope
- it exposes a redundant DataNotificationInfoBar object
Attachment #708266 -
Flags: review?(gavin.sharp)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → dao
Comment 1•12 years ago
|
||
Well, I tried to catch this in bug 804745 comment 25, but I guess we forgot to remove the global import() call :( We were in a bit of a hurry... Thanks for following up.
Comment 2•12 years ago
|
||
Comment on attachment 708266 [details] [diff] [review]
patch
Greg and I had discussed using a singleton vs. a constructor function, and Greg had some arguments about not liking singletons in general, related to them making testing and re-usability harder. In looking back at it I don't think those really apply here, though, and this code is simpler this way.
Attachment #708266 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 708266 [details] [diff] [review]
patch
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 804745
User impact if declined: add-ons could start relying on log4moz.js being imported into browser.js, and then break on the next update because we removed the accidental import
Testing completed (on m-c, etc.): on m-c
Risk to taking this patch (and alternatives if risky): low
String or UUID changes made by this patch: reverting accidental log4moz.js import into browser.js
Attachment #708266 -
Flags: approval-mozilla-aurora?
Assignee | ||
Updated•12 years ago
|
Target Milestone: --- → Firefox 21
Assignee | ||
Updated•12 years ago
|
status-firefox20:
--- → affected
Updated•12 years ago
|
Attachment #708266 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 6•12 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•