Work - Move NewTabUtils.jsm from /browser/modules to /toolkit/modules

RESOLVED FIXED in mozilla21

Status

()

defect
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: mbrubeck, Assigned: mbrubeck)

Tracking

(Blocks 1 bug)

Trunk
mozilla21
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [feature=work])

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

6 years ago
For bug 808770, we would like to use NewTabUtils.jsm in Metro Firefox.  I think the simplest way to do this is to move it into /toolkit/content.  Any objections, comments, alternatives?

See also the discussion in similar bug 811548.
Assignee

Comment 1

6 years ago
Posted patch patch (obsolete) — Splinter Review
Attachment #712798 - Flags: review?(ttaubert)
(In reply to Matt Brubeck (:mbrubeck) from comment #0)
> Any objections

None from me - there's nothing explicitly specific to desktop Firefox in there.

Without having thought about it too deeply, I'd say its probably worth looking into whether it should init itself on first use, like what's being done in bug 811548.
Assignee

Comment 3

6 years ago
(In reply to Blair McBride [:Unfocused] from comment #2)
> Without having thought about it too deeply, I'd say its probably worth
> looking into whether it should init itself on first use, like what's being
> done in bug 811548.

NewTabUtils.init adds some telemetry probes, and an expiration filter.  We probably want both to happen at startup; otherwise we risk missing some Telemetry and expiring useful thumbnails, for users who don't open the new tab page in time.

Should we keep the explicit init() as a reminder of this, or is it enough to just Cu.import() the module at startup and have it init itself?
I think we should generally avoid implicit initialization (i.e. side effects to import()) for JS modules.
Attachment #712798 - Flags: review?(ttaubert) → review+
Can you move this to toolkit/modules instead? See bug 828116.
Assignee

Comment 6

6 years ago
Posted patch patch v2Splinter Review
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #5)
> Can you move this to toolkit/modules instead? See bug 828116.

Sure!  (And thanks, I was wondering how to decide which subdirectory was more appropriate.)
Attachment #712798 - Attachment is obsolete: true
Attachment #714522 - Flags: superreview?(gavin.sharp)
Attachment #714522 - Flags: review+
Assignee

Updated

6 years ago
Summary: Work - Move NewTabUtils.jsm from /browser/modules to /toolkit/content → Work - Move NewTabUtils.jsm from /browser/modules to /toolkit/modules
Attachment #714522 - Flags: superreview?(gavin.sharp) → superreview+
https://hg.mozilla.org/mozilla-central/rev/0e3aca33a039
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.