Closed
Bug 258380
Opened 21 years ago
Closed 21 years ago
###!!! ASSERTION: You are calling CreateInstance "{b148eed2-236d-11d3-b35c-00a0cc3c1cde}" when a service for this CID already exists!: 'Error', file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1877
Categories
(SeaMonkey :: UI Design, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 277853
People
(Reporter: timeless, Assigned: ted)
Details
(Keywords: assertion)
###!!! ASSERTION: You are calling CreateInstance
"{b148eed2-236d-11d3-b35c-00a0cc3c1cde}" when a service for this CID already
exists!: 'Error', file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1877
R:\mozilla\dbg-i586-pc-msvc\dist\bin\components>grep b148ee compreg.dat
{b148eed2-236d-11d3-b35c-00a0cc3c1cde},,,,rel:gkwidget.dll
@mozilla.org/sound;1,{b148eed2-236d-11d3-b35c-00a0cc3c1cde}
issue: components should generally be treated as either singletons or non
singletons. @mozilla.org/sound;1 is being used as both, the fix is to find all
instances of:
Components.classes["@mozilla.org/sound;1"].createInstance
Components.classes["@mozilla.org/sound;1"].getService
do_CreateInstance("@mozilla.org/sound;1")
do_GetService("@mozilla.org/sound;1")
and similar ilk and standardize on either createInstance or getService. Pick
createInstance if there is internal state which needs to be maintained per
instance and multiple instances can peacefully coexist. Pick getService if there
is no internal state or if multiple instances cannot peacefully coexist and the
object internally manages multiple requests.
this decission is left as an exercise for the bug owner. people on irc should be
willing to help with the decission if necessary.
Updated•21 years ago
|
Product: Core → Mozilla Application Suite
*** This bug has been marked as a duplicate of 277853 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•