Closed Bug 1190857 Opened 9 years ago Closed 9 years ago

Add loader alias to DevTools loader exports

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
Firefox 43
Tracking Status
firefox43 --- fixed

People

(Reporter: jryans, Assigned: ochameau)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

In bug 1188401, many users of Loader.jsm are changed to store the `devtools` export (the loader object with lazy APIs) under the name `loader`, which matches what happens inside a module.

We should export this object as `loader` for real, so callers don't have to rename it everywhere.
Assignee: nobody → poirot.alex
Attached patch patch v1 (obsolete) — Splinter Review
I had to rename existing variable whose name is `loader`  in frame script utils and loader.jsm.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=2d4278c2855e
Attachment #8646426 - Flags: review?(jryans)
Comment on attachment 8646426 [details] [diff] [review]
patch v1

Review of attachment 8646426 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/framework/gDevTools.jsm
@@ +9,5 @@
>  const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
>  
>  Cu.import("resource://gre/modules/XPCOMUtils.jsm");
>  Cu.import("resource://gre/modules/Services.jsm");
> +const {require, loader} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});

Nit: spaces in braces (either change this one, or reverse Components above to match this)

::: browser/devtools/shared/frame-script-utils.js
@@ +11,1 @@
>              .getService(Ci.mozIJSSubScriptLoader);

Nit: fix indent
Attachment #8646426 - Flags: review?(jryans) → review+
Attached patch patch v1Splinter Review
Attachment #8646923 - Flags: review+
Attachment #8646426 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/9dca174c12f9
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: