Closed
Bug 24876
Opened 26 years ago
Closed 26 years ago
Don't use |nsCOMPtr| on non-interfaces
Categories
(Core :: Networking: Cache, defect, P3)
Core
Networking: Cache
Tracking
()
VERIFIED
FIXED
People
(Reporter: scc-obsolete, Assigned: gagan)
References
(
URL
)
Details
There are two occurances of |nsCOMPtr<nsCachedNetData>|. You can't do that! You
can't use an |nsCOMPtr| on a non-interface, i.e., you should be using |nsCOMPtr<
nsICachedNetData>| here. One downside of the current code is that it is stopping
some people from compiling, e.g., Ciaran.Deignan@bull.net whose compiler reports:
"../../../dist/include/nsCOMPtr.h", line 191.3: 1540-016: (S) private
member "nsCachedNetData::nsCachedNetData()" cannot be accessed.
The two occurances are currently at:
<http://lxr.mozilla.org/seamonkey/source/netwerk/cache/mgr/
nsCachedNetData.cpp#117>, and
<http://lxr.mozilla.org/seamonkey/source/netwerk/cache/mgr/
nsCachedNetData.cpp#1144>
I don't think the nsCOMPtr was needed there... cleaned up.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Comment 2•26 years ago
|
||
I saw your modifications at lines 117 and 1144 of nsCachedNetData.ccp
and I manually integrated them into my source file.
However I now have the same problem again at line 191:
"../../../dist/include/nsCOMPtr.h", line 191.3: 1540-016: (S) private member
"nsCachedNetData::nsCachedNetData()" cannot be accessed.
Line 191 is as follows:
+189 NS_IMPL_ADDREF(nsCachedNetData)
+190 NS_IMETHODIMP
+191 nsCachedNetData::QueryInterface(REFNSIID aIID, void** aInstancePtr)
+192 {
+193 NS_ASSERTION(aInstancePtr, "QueryInterface requires a non-NULL dest$
I upgraded my compiler, I am now using ibmcxxx 3.6.6. I don't think its worse,
but it ain't better...
Thanks
Ciaran
Status: RESOLVED → REOPENED
| Reporter | ||
Comment 4•26 years ago
|
||
This error means someone is still using an |nsCOMPtr<nsCachedNetData>| object
somewhere.
ciaran.deignan@bull.net: I can't seem to locate that problem in my builds, could
you try and update the mozilla/netwerk/cache dir and verify? Thx.
Comment 7•26 years ago
|
||
Tested with M13 distribution, this error no longer appears
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•