Closed Bug 1436425 Opened 6 years ago Closed 6 years ago

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

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: marco, Assigned: marco)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
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+
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
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: