Closed Bug 1276341 Opened 9 years ago Closed 9 years ago

replace uses of Cu.import

Categories

(DevTools :: Framework, enhancement, P1)

enhancement

Tracking

(firefox50 fixed)

RESOLVED FIXED
Firefox 50
Iteration:
50.4 - Aug 1
Tracking Status
firefox50 --- fixed

People

(Reporter: tromey, Assigned: tromey)

References

Details

(Whiteboard: [devtools-html])

Attachments

(2 files)

The uses of Cu.import in the inspector and its dependencies will have to be replaced (probably with "require") as part of the de-chrome-ification project.
Probably this should be broken down by import target. There are a lot of imports, even excluding tests and the server: pokyo. git grep Cu.import -- devtools/|grep -v /server |grep -v /test |wc -l 243 On irc :jryans pointed out that event-emitter.js imports are readily done: https://dxr.mozilla.org/mozilla-central/search?q=Cu.import+event-emitter+path%3Adevtools&redirect=false%29
Whiteboard: [devtools-html] → [devtools-html] [triage]
Comment on attachment 8758724 [details] Bug 1276341 - remove some misleading import comments; Wrong bug.
Attachment #8758724 - Attachment is obsolete: true
Attachment #8758724 - Flags: review?(jryans)
Priority: -- → P2
Whiteboard: [devtools-html] [triage] → [devtools-html]
Flags: qe-verify-
Let's not forget lazyImporter as well.
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Iteration: --- → 50.3 - Jul 18
Priority: P2 → P1
Iteration: 50.3 - Jul 18 → 50.4 - Aug 1
It turns out that there are only a few imports that are directly addressable. The others have to be part of some other bug; for example actor-registry.js is using Cu.import, but I think that one (IIUC, which I'm not sure I do) probably has to be address with some other transport changes. I'll upload a patch for the few I found.
Attachment #8758724 - Attachment description: MozReview Request: Bug 1276341 - rename promise_defer.js to defer.js; r?jryans → Bug 1276341 - remove some misleading import comments;
Attachment #8758724 - Attachment is obsolete: false
Attachment #8773013 - Flags: review?(jryans)
Attachment #8758724 - Flags: review?(jryans)
Comment on attachment 8758724 [details] Bug 1276341 - remove some misleading import comments; Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56920/diff/1-2/
Comment on attachment 8773013 [details] Bug 1276341 - don't use Cu.import for event-emitter.js; https://reviewboard.mozilla.org/r/65652/#review63022 Looks good! I was thinking there would be more to do here, but I guess the others are in test files or they are imports of JSMs which probably need a focus of their own, since they either don't work in content or at least contain more imports.
Attachment #8773013 - Flags: review?(jryans) → review+
Pushed by ttromey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8980a789ce92 remove some misleading import comments; r=jryans https://hg.mozilla.org/integration/autoland/rev/42532fefe293 don't use Cu.import for event-emitter.js; r=jryans
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: