The system add-ons that shipped with the app should be loaded in safe mode

RESOLVED FIXED in Firefox 44

Status

()

Toolkit
Add-ons Manager
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mossop, Assigned: mossop)

Tracking

Trunk
mozilla44
Points:
---

Firefox Tracking Flags

(firefox43 affected, firefox44 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
What should we do with system add-ons in safe mode?
(Assignee)

Updated

3 years ago
Summary: Figure out what to do about system add-ons when in safe mode → The system add-ons that shipped with the app should be loaded in safe mode
(Assignee)

Updated

3 years ago
Assignee: nobody → dtownsend
(Assignee)

Comment 1

3 years ago
Created attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer
Attachment #8665533 - Flags: review?(rhelmer)
(Assignee)

Comment 2

3 years ago
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Actually this isn't quite right yet.
Attachment #8665533 - Flags: review?(rhelmer)
(Assignee)

Comment 3

3 years ago
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

By making the updated system add-on install location return an empty set when
in safe mode it causes us to rescan and enable the default system add-ons.

The complication is calling the uninstall method on the updated add-ons when
switching to safe mode, for that we have to cache the fact that an add-on
can run in safe mode in the bootstrappedAddons data so it persists to the
next restart and can be accessed when the updated add-on has been hidden.
Attachment #8665533 - Flags: review?(rhelmer)
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

https://reviewboard.mozilla.org/r/20251/#review18725
Attachment #8665533 - Flags: review?(rhelmer) → review+
(Assignee)

Comment 5

3 years ago
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

By making the updated system add-on install location return an empty set when
in safe mode it causes us to rescan and enable the default system add-ons.

The complication is calling the uninstall method on the updated add-ons when
switching to safe mode, for that we have to cache the fact that an add-on
can run in safe mode in the bootstrappedAddons data so it persists to the
next restart and can be accessed when the updated add-on has been hidden.
(Assignee)

Comment 6

3 years ago
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

Apparently I didn't run tests on this properly so I had to make some tweaks to fix an issue, see https://reviewboard.mozilla.org/r/20251/diff/2-3/ but you can ignore the bottom two changes listed as they come from rebasing this on top of other stuff that has landed.
Attachment #8665533 - Flags: review+ → review?(rhelmer)
Comment on attachment 8665533 [details]
MozReview Request: Bug 1193973: System add-ons that shipped with the app should be loaded in safe mode. r?rhelmer

https://reviewboard.mozilla.org/r/20251/#review18893

::: toolkit/mozapps/extensions/internal/XPIProvider.jsm:4332
(Diff revisions 2 - 3)
> -    let runInSafeMode = "runInSafeMode" in aAddon ? aAddon.runInSafeMode : canRunInSafeMode(aAddon);
> +    let runInSafeMode = ("runInSafeMode" in aAddon) ? aAddon.runInSafeMode : canRunInSafeMode(aAddon);

why are the parens necesssary?
Attachment #8665533 - Flags: review?(rhelmer) → review+
(Assignee)

Comment 8

3 years ago
https://reviewboard.mozilla.org/r/20251/#review18893

> why are the parens necesssary?

Looks like they're not, I can drop that.
https://hg.mozilla.org/mozilla-central/rev/08ae873336b7
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.