Closed Bug 1811012 Opened 3 years ago Closed 3 years ago

Eliminate nsAppStartupNotifier and special "service," prefix on components

Categories

(Thunderbird :: Upstream Synchronization, task)

task

Tracking

(thunderbird_esr102 unaffected)

RESOLVED FIXED
111 Branch
Tracking Status
thunderbird_esr102 --- unaffected

People

(Reporter: cmartin, Assigned: darktrojan)

References

Details

Attachments

(1 file)

On mozilla-central, we are about to land D165414, which will eliminate nsAppStartupNotifier and the special service, prefix on categories that it enabled.

In practice, every category started up by nsAppStartupNotifier is a singleton anyway, at which point the entire thing just becomes an overly complex way (2 headers + 1 source file) of calling NS_CreateServicesFromCategory.

Porting this shouldn't be too bad:

  1. Replace any #include "nsAppStartupNotifier.h" with #include "nsCategoryManagerUtils.h"
  2. Replace any call to nsAppStartupNotifier::NotifyObservers(APPSTARTUP_CATEGORY, subject) with NS_CreateServicesFromCategory("app-startup", subject, "app-startup", nullptr)
  3. Find any app-startup components in your XPCOM manifests and remove the service, prefix from them
  4. If any of them don't have theservice, prefix, ensure that they are actually singletons (chances are they already are, and probably should've had the prefix all along)
  5. Eliminate nsIAppStartupNotifier.h, nsAppStartupNotifier.h, and nsAppStartupNotifier.cpp
  6. In our case, we had to update some relevant documentation

Today is really unfortunate timing but you weren't to know that. Thanks for the heads-up and instructions.

Assignee: nobody → geoff
Status: NEW → ASSIGNED

(Comment removed - Just ended up talking to Geoff on Matrix)

Depends on: 1799470
Target Milestone: --- → 111 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/45322ce67587
Eliminate nsAppStartupNotifier and special "service," prefix on components. r=john.bieling

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: