Closed
Bug 554253
Opened 15 years ago
Closed 15 years ago
Convert nsCOMPtr<nsPresContext> to nsRefPtr<nsPresContext>
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a4
People
(Reporter: craig.topper, Assigned: craig.topper)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
42.52 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
nsPresContext is not an interface and should not be using nsCOMPtr. This would cause build failures if nsPresContext gained any more interfaces or lost the one it has.
Assignee | ||
Comment 1•15 years ago
|
||
I temporarily made nsPresContext ambiguously inherit nsISupports and fixed all the build errors to find these. So hopefully that means I got them all.
This is the only questionable part I encountered. Hopefully I did this right.
- NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mPresContext)
+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_MEMBER(mPresContext.get(), nsPresContext)
Attachment #434184 -
Flags: review?(roc)
Comment on attachment 434184 [details] [diff] [review]
Patch to fix all the places I could find
thanks!!!
Attachment #434184 -
Flags: review?(roc) → review+
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Comment 3•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Summary: Convert nsCOMPtr<nsPresContext> to nsRefPtr<nsPResContext> → Convert nsCOMPtr<nsPresContext> to nsRefPtr<nsPresContext>
Target Milestone: --- → mozilla1.9.3a4
Comment 4•15 years ago
|
||
(In reply to comment #1)
> - NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mPresContext)
> + NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_MEMBER(mPresContext.get(),
> nsPresContext)
This is very wrong, did you even need to change this at all?
Assignee | ||
Comment 5•15 years ago
|
||
I had temporarily made nsISupports and ambiguous base of nsPresContext so I could make sure I caught all places that were using nsCOMPtr. This piece of code failed because inside the macro NoteXPCOMChild is called which takes an nsISupports. Should we change it back or is there a right way to make it support nsRefPtr?
You need to log in
before you can comment on or make changes to this bug.
Description
•