Closed Bug 836470 Opened 7 years ago Closed 7 years ago

Clean up JS module imports that use a temporary scope object in order not to pollute the global scope

Categories

(Firefox :: General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 21

People

(Reporter: dao, Assigned: dao)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
No description provided.
Attachment #708293 - Flags: review?(gavin.sharp)
Comment on attachment 708293 [details] [diff] [review]
patch

>diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js

>+        Cu.import("resource://gre/modules/DownloadTaskbarProgress.jsm", {})
>+          .DownloadTaskbarProgress.onBrowserWindowLoad(window);

This looks like a call to import and it's easy to miss the other function call. Can you make it:

let DownloadTaskbarProgress = Cu.import("resource://gre/modules/DownloadTaskbarProgress.jsm", {}).DownloadTaskbarProgress;
DownloadTaskbarProgress.onBrowserWindowLoad(window);

(wrapping as necessary)
Attachment #708293 - Flags: review?(gavin.sharp) → review+
https://hg.mozilla.org/mozilla-central/rev/02a4065337e6
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
You need to log in before you can comment on or make changes to this bug.