Closed
Bug 265414
Opened 20 years ago
Closed 20 years ago
###!!! ASSERTION: You are calling CreateInstance "{fbc81170-1f69-11d3-9344-00104ba0fd40}" when a service for this CID already exists!: 'Error', file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1880
Categories
(Other Applications :: ChatZilla, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: bugzilla-mozilla-20000923)
Details
Attachments
(1 file, 2 obsolete files)
|
2.52 KB,
patch
|
rginda
:
review+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: You are calling CreateInstance
"{fbc81170-1f69-11d3-9344-00104ba0fd40}" when a service for this CID already
exists!: 'Error', file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1880
Break: at file r:/mozilla/xpcom/components/nsComponentManager.cpp, line 1880
0 [native frame]
1 getFileFromURLSpec(url = "file:///C:/DOCUMENTSAND
ETTINGS/xxxx/APPLICATIONDATA/Mozi
lla/Profiles/zzzzzz/pxf3204n.slt/chatzilla/scripts/")
["chrome://chatzilla/content/lib/js/utils.js":
855]
FILE_CTRID = "@mozilla.org/network/protocol;1?name=file"
nsIFileProtocolHandler = nsIFileProtocolHandler
handler = undefined
this = [object ChromeWindow @ 0x3c3bc78]
2 processStartupScripts() ["chrome://chatzilla/content/static.js":412]
scripts = file:///C:/DOCUMENTSAND0 [native frame]
1 getFileFromURLSpec(url = "file:///C:/DOCUMENTSAND
ETTINGS/xxxx/APPLICATIONDATA/Mozi
lla/Profiles/zzzzzz/pxf3204n.slt/chatzilla/scripts/")
["chrome://chatzilla/content/lib/js/utils.js":
855]
FILE_CTRID = "@mozilla.org/network/protocol;1?name=file"
nsIFileProtocolHandler = nsIFileProtocolHandler
handler = undefined
this = [object ChromeWindow @ 0x3c3bc78]
2 processStartupScripts() ["chrome://chatzilla/content/static.js":412]
scripts = file:///C:/DOCUMENTSAND
yes, DumpJSStack corrupted my stack, it's ok, the problem is frame 1. protocol
handlers are services, they're not supposed to be created.| Assignee | ||
Comment 1•20 years ago
|
||
Oooh, nice one (oops!).
| Assignee | ||
Comment 2•20 years ago
|
||
| Assignee | ||
Updated•20 years ago
|
Attachment #162837 -
Flags: review?(rginda)
Comment 3•20 years ago
|
||
maybe using http://lxr.mozilla.org/seamonkey/source/netwerk/base/public/nsIIOService.idl#65 would be a good idea?
| Assignee | ||
Comment 4•20 years ago
|
||
That just takes longer... is there actually any reason to use it? I notice that network.protocol-handler.external.file would block this (there also seems to be some other blocking going on that I don't understand) and probably screw everything up, so I think I'd rather stick to what we know works. getURLSpecFromFile would suffer from such blocking already, it seems...
Comment 5•20 years ago
|
||
> I notice that network.protocol-handler.external.file would block this
that pref likely screws up starting mozilla....| Assignee | ||
Comment 6•20 years ago
|
||
Attachment #162837 -
Attachment is obsolete: true
| Assignee | ||
Updated•20 years ago
|
Attachment #162837 -
Flags: review?(rginda)
| Assignee | ||
Updated•20 years ago
|
Attachment #162848 -
Flags: review?(rginda)
Comment 7•20 years ago
|
||
Comment on attachment 162848 [details] [diff] [review] nsIIOService version the getService method takes an option reference to the interface you'd like. That avoids the extra QueryInterface call. Other than that, it looks fine. r=rginda
Attachment #162848 -
Flags: review?(rginda) → review+
Comment 8•20 years ago
|
||
Comment on attachment 162848 [details] [diff] [review] nsIIOService version >Index: js/lib/utils.js >+ case "object": >+ rv = obj.QueryInterface[iface]; shouldn't this be: obj.QueryInterface(iface); ??
| Assignee | ||
Comment 9•20 years ago
|
||
(In reply to comment #8) > (From update of attachment 162848 [details] [diff] [review]) > >Index: js/lib/utils.js > > >+ case "object": > >+ rv = obj.QueryInterface[iface]; > > shouldn't this be: obj.QueryInterface(iface); ?? I did wonder that, but this procedure is copy-and-paste from the existing "newObject" procedure that does createInstance() on things. rginda? Should I re-do both these functions?
Comment 10•20 years ago
|
||
> rginda? Should I re-do both these functions?
Sounds good. You shouldn't need QueryInterface at all, if you pass the
requested interface to the getService() (or createInstance()) call.| Assignee | ||
Comment 11•20 years ago
|
||
| Assignee | ||
Updated•20 years ago
|
Attachment #162848 -
Attachment is obsolete: true
| Assignee | ||
Updated•20 years ago
|
Attachment #162848 -
Flags: review+
| Assignee | ||
Comment 12•20 years ago
|
||
Comment on attachment 163077 [details] [diff] [review] Update newObject/getService to use short forms without specific QI I added the ability to call these two functions without a third parameter in case it's useful.
Attachment #163077 -
Flags: review?(rginda)
Comment 13•20 years ago
|
||
Comment on attachment 163077 [details] [diff] [review] Update newObject/getService to use short forms without specific QI r=rginda
Attachment #163077 -
Flags: review?(rginda) → review+
| Assignee | ||
Comment 14•20 years ago
|
||
Checked in --> FIXED.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Core → Other Applications
You need to log in
before you can comment on or make changes to this bug.
Description
•