Update EM and blocklist service to be initialised on profile-after-change

VERIFIED FIXED in mozilla1.9.1b3

Status

()

Toolkit
Add-ons Manager
--
minor
VERIFIED FIXED
9 years ago
9 years ago

People

(Reporter: mossop, Assigned: mossop)

Tracking

({verified1.9.1})

Trunk
mozilla1.9.1b3
verified1.9.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

9 years ago
Currently both services initialise at app-startup just so they can register a few notifications then do all their processing at profile-after-change anyway. Might as well simplify that now bug 452486 is fixed
(Assignee)

Updated

9 years ago
Whiteboard: [good first bug]
(Assignee)

Comment 1

9 years ago
Created attachment 345942 [details] [diff] [review]
patch rev 1

Simple patch to do this. The profile-after-change category doesn't support the service flag, it just always gets components as services.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #345942 - Flags: review?(robert.bugzilla)
Comment on attachment 345942 [details] [diff] [review]
patch rev 1

Dave, with this change can't the adding of the quit-application observer, etc. also be removed?

  observe: function EM_observe(subject, topic, data) {
    switch (topic) {
    case "profile-after-change":
      gOS.addObserver(this, "quit-application", false);
      this._profileSelected();
      break;
    case "quit-application-requested":
      this._confirmCancelDownloadsOnQuit(subject);
      break;
    case "offline-requested":
      this._confirmCancelDownloadsOnOffline(subject);
      break;
    case "quit-application":
      gOS.removeObserver(this, "quit-application");
      break;
    case "xpcom-shutdown":
      this._shutdown();
      break;
    case "nsPref:changed":
      if (data == PREF_EM_LOGGING_ENABLED)
        this._loggingToggled();
      else if (data == PREF_EM_CHECK_COMPATIBILITY ||
               data == PREF_EM_CHECK_UPDATE_SECURITY)
        this._updateAppDisabledState();
      else if ((data == PREF_MATCH_OS_LOCALE) || (data == PREF_SELECTED_LOCALE))
        this._updateLocale();
      break;
    }
  },
(Assignee)

Comment 3

9 years ago
Created attachment 346020 [details] [diff] [review]
patch rev 2

Yeah hadn't spotted that, done the same with the blocklist service too.
Attachment #345942 - Attachment is obsolete: true
Attachment #346020 - Flags: review?(robert.bugzilla)
Attachment #345942 - Flags: review?(robert.bugzilla)
Attachment #346020 - Flags: review?(robert.bugzilla) → review+
(Assignee)

Updated

9 years ago
Whiteboard: [good first bug]
(Assignee)

Comment 4

9 years ago
Comment on attachment 346020 [details] [diff] [review]
patch rev 2

This is a trivial fix that slightly reduces calls into the extension manager and blocklist service during startup. Not likely to see a perf win as it is so small but would like to land it anyway.
Attachment #346020 - Flags: approval1.9.1?
Comment on attachment 346020 [details] [diff] [review]
patch rev 2

a191=beltzner
Attachment #346020 - Flags: approval1.9.1? → approval1.9.1+
(Assignee)

Comment 6

9 years ago
Created attachment 350491 [details] [diff] [review]
patch for checkin
Attachment #346020 - Attachment is obsolete: true
Attachment #350491 - Flags: review+
Attachment #350491 - Flags: approval1.9.1+
http://hg.mozilla.org/mozilla-central/rev/169f2cc23290
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.9.1 → mozilla1.9.1b3
Dave, plans to land this on 191?

Updated

9 years ago
Keywords: fixed1.9.1

Comment 9

9 years ago
Not much i can verify here.  code cleanup work.  Marking Verified per checkin.
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
You need to log in before you can comment on or make changes to this bug.