Closed
Bug 279210
Opened 21 years ago
Closed 17 years ago
Compiler warning because of nsCOMPtr<nsIPresContext>
Categories
(Core :: XPCOM, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: aaronlev, Assigned: benjamin)
References
Details
Attachments
(1 file, 1 obsolete file)
|
14.93 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
I'm getting multiple repetitions of the following VC++ compiler warnings when
building the accessible directory:
nsHTMLInputElement.cpp
../../../../dist\include\xpcom\nsCOMPtr.h(228) : warning C4624:
'nsDerivedSafe<T>' : destructor could not be generated because a base class
destructor is inaccessible
with
[
T=nsPresContext
]
c:/moz\mozilla\content\html\content\src\nsHTMLInputElement.cpp(705) :
see reference to class template instantiation 'nsDerivedSafe<T>' being compiled
with
[
T=nsPresContext
]
| Reporter | ||
Comment 1•21 years ago
|
||
Actually, I'm noticing this in more places than just the accessible directory.
I believe that getting rid of the nsCOMPtr<> around nsIPresContext fixes the
problem.
Comment 2•20 years ago
|
||
I saw this kind of warning when compiling nsProxyEventClass, nsObserverEnumerator, nsCategoryManager, xptiAdditionalManagersEnumerator, nsProxyEventObject, nsEventQueueServiceImpl, nsXPCFastLoadIO, nsPACMan, nsProxyInfo, nsHostRecord, nsHostResolver, nsMappedAttributes, nsHTMLStyleSheet, nsSVGCoordCtxHolder.
Adding a non implemented destructor to nsCOMPtr seems the solution in analogy with bug 209667. I did try this patch on a custom build: warning were gone and build was fine but I'm not 100% sure this is the right solution.
Updated•19 years ago
|
QA Contact: bugzilla → disability.access
Comment 3•17 years ago
|
||
Comment on attachment 211776 [details] [diff] [review]
define a non implemented dtor for nsDeriveSafe
Asking for review.
Attachment #211776 -
Flags: review?
Updated•17 years ago
|
Attachment #211776 -
Flags: review?(dbaron)
Attachment #211776 -
Flags: review?(benjamin)
Attachment #211776 -
Flags: review?
Comment on attachment 211776 [details] [diff] [review]
define a non implemented dtor for nsDeriveSafe
This is OK with me, but I'd like Benjamin to look as well.
Attachment #211776 -
Flags: review?(dbaron) → review+
| Assignee | ||
Comment 5•17 years ago
|
||
Comment on attachment 211776 [details] [diff] [review]
define a non implemented dtor for nsDeriveSafe
This will break IRIX, I'm afraid.
Really, what I'd like to do is get rid of nsDerivedSafe altogether... I think it has outlived its usefulness and is now just an extra layer of C++ cruft. Dbaron, what do you think?
| Assignee | ||
Comment 6•17 years ago
|
||
Attachment #332753 -
Flags: review?(dbaron)
Comment on attachment 332753 [details] [diff] [review]
remove nsderivedsafe, rev. 1
OK. I've never been crazy about nsDerivedSafe, since it requires extra casts or .get() when static_casting an nsCOMPtr to a more-derived class; we should probably file a followup bug on finding and removing those...
Attachment #332753 -
Flags: review?(dbaron) → review+
Updated•17 years ago
|
Attachment #211776 -
Flags: review?(benjamin)
| Assignee | ||
Comment 8•17 years ago
|
||
Pushed to mozilla-central, revision 2cdac4c2a023
Assignee: aaronleventhal → benjamin
| Assignee | ||
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 10•17 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/20080811184452 Minefield/3.1a2pre] (home, optim default) (W2Ksp4)
V.Fixed
Status: RESOLVED → VERIFIED
Component: Disability Access → XPCOM
Product: Firefox → Core
QA Contact: disability.access → xpcom
Version: unspecified → Trunk
Updated•17 years ago
|
Attachment #211776 -
Attachment is obsolete: true
Comment 11•17 years ago
|
||
(In reply to comment #7)
> we should probably file a followup bug on finding and removing those...
I filed bug 450127...
You need to log in
before you can comment on or make changes to this bug.
Description
•