Closed
Bug 1142568
Opened 10 years ago
Closed 6 years ago
Clean up global scope pollution from browser-social.js
Categories
(Firefox Graveyard :: SocialAPI, defect)
Firefox Graveyard
SocialAPI
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: dao, Unassigned)
References
Details
browser-social.js does this:
(function() {
XPCOMUtils.defineLazyModuleGetter(this, "PanelFrame",
"resource:///modules/PanelFrame.jsm");
XPCOMUtils.defineLazyGetter(this, "OpenGraphBuilder", function() {
let tmp = {};
Cu.import("resource:///modules/Social.jsm", tmp);
return tmp.OpenGraphBuilder;
});
...
})();
As it stands, the anonymous function is completely pointless, and all the lazy getters (PanelFrame, OpenGraphBuilder, DynamicResizeWatcher, sizeSocialPanelToContent, CreateSocialStatusWidget, CreateSocialMarkWidget, hookWindowCloseForPanelClose) leak into the browser window's global scope ("this") which is shared with lots of other scripts.
Flags: firefox-backlog+
Reporter | ||
Comment 1•6 years ago
|
||
browser-social.js is gone.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•