Add loader alias to DevTools loader exports

RESOLVED FIXED in Firefox 43

Status

RESOLVED FIXED
3 years ago
2 months ago

People

(Reporter: jryans, Assigned: ochameau)

Tracking

(Blocks: 2 bugs)

unspecified
Firefox 43
Dependency tree / graph

Firefox Tracking Flags

(firefox43 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

3 years ago
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)

Updated

3 years ago
Assignee: nobody → poirot.alex
(Assignee)

Comment 1

3 years ago
Created attachment 8646426 [details] [diff] [review]
patch v1

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
(Assignee)

Updated

3 years ago
Attachment #8646426 - Flags: review?(jryans)
(Reporter)

Comment 2

3 years ago
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+
(Assignee)

Updated

3 years ago
Attachment #8646923 - Flags: review+
(Assignee)

Updated

3 years ago
Attachment #8646426 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/9dca174c12f9
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43

Updated

2 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.