Don't import resetProfile.js when it is not needed

RESOLVED FIXED in Firefox 60

Status

()

Toolkit
General
RESOLVED FIXED
16 days ago
15 days ago

People

(Reporter: marco, Assigned: marco)

Tracking

(Blocks: 1 bug)

unspecified
mozilla60
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 days ago
Created attachment 8949076 [details] [diff] [review]
Patch

Most of resetProfile.js is actually not needed:
browser/base/content/safeMode.xul - browser/base/content/safeMode.js can simply import Services.jsm directly;
toolkit/content/aboutSupport.xhtml - already imports both ResetProfile.jsm and Services.jsm;
defining Cu in resetProfile.js seems no longer necessary.

onResetProfileAccepted is never tested, but I guess it is still necessary.
Attachment #8949076 - Flags: review?(MattN+bmo)
OK, I see now that sharing this file was more useful before https://hg.mozilla.org/mozilla-central/rev/38ce31cc9334#l9.1

> onResetProfileAccepted is never tested, but I guess it is still necessary.

Our test bypasses the UI. If you wanted to test it you could add it to https://dxr.mozilla.org/mozilla-central/source/browser/components/migration/tests/marionette/test_refresh_firefox.py rather than calling self.marionette.restart but I'm not sure if Marionette supports that.
Blocks: 1063702
Attachment #8949076 - Flags: review?(MattN+bmo) → review+

Comment 2

15 days ago
Pushed by mcastelluccio@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3cc726cd620
Stop importing resetProfile.js when it is unneeded. r=MattN
https://hg.mozilla.org/mozilla-central/rev/e3cc726cd620
Status: ASSIGNED → RESOLVED
Last Resolved: 15 days ago
status-firefox60: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.