autoload xpcom components

RESOLVED FIXED

Status

()

RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
We need a way to create components at XPCOM Startup by default (ie. autoload
components).  Currently people are depending on application specific notifications.
(Assignee)

Comment 1

16 years ago
Created attachment 100273 [details] [diff] [review]
patch v.1

Comment 2

16 years ago
Comment on attachment 100273 [details] [diff] [review]
patch v.1

sr=rpotts@netscape.com
Attachment #100273 - Flags: superreview+
Comment on attachment 100273 [details] [diff] [review]
patch v.1

> // Observing xpcom shutdown
>+#define NS_XPCOM_STARTUP_OBSERVER_ID "xpcom-startup"
> #define NS_XPCOM_SHUTDOWN_OBSERVER_ID "xpcom-shutdown"

xpcom-shutdown is an observer broadcast topic, the new xpcom-startup
is something completely different. By putting them together, after
the observer comment, and with similar define names you're going to
confuse people.

Hopefully the documentation will be clear (some future day when it
gets written), but I'd be happier if you renamed this and moved it up
two lines.  NS_XPCOM_STARTUP_CATEGORY_NAME ?

Please change this
r=dveditz
Attachment #100273 - Flags: superreview+ → review+
Attachment #100273 - Flags: superreview+
(Assignee)

Comment 4

16 years ago
Checking in build/nsXPComInit.cpp;
/cvsroot/mozilla/xpcom/build/nsXPComInit.cpp,v  <--  nsXPComInit.cpp
new revision: 1.163; previous revision: 1.162
done
Checking in components/nsIServiceManager.idl;
/cvsroot/mozilla/xpcom/components/nsIServiceManager.idl,v  <-- 
nsIServiceManager.idl
new revision: 3.2; previous revision: 3.1
done

thanks.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 5

16 years ago
just a side comment - we already have the app-startup stuff, which is intended
for mozilla startup stuff... this more or less follows the convention, but I
wanted it mentioned here for future reference.

the implementation is here:
http://lxr.mozilla.org/seamonkey/source/embedding/components/appstartup/src/nsAppStartupNotifier.cpp

we instantiate it here:
http://lxr.mozilla.org/seamonkey/source/embedding/base/nsEmbedAPI.cpp#145
http://lxr.mozilla.org/seamonkey/source/xpfe/bootstrap/nsAppRunner.cpp#1376
You need to log in before you can comment on or make changes to this bug.