Closed
Bug 1248784
Opened 7 years ago
Closed 7 years ago
Allow RefPtr to operate on arbitrary pointers with RefPtrTraits
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: bholley, Assigned: bholley)
Details
Attachments
(2 files)
4.81 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
3.69 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
Per discussion on IRC. This will be useful for our opaque pointers to reference-counted Servo types. I have working patches, uploading momentarily.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8719993 -
Flags: review?(nfroyd)
Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8719994 -
Flags: review?(nfroyd)
Assignee | ||
Comment 3•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9fb2814e1d3e
![]() |
||
Updated•7 years ago
|
Attachment #8719993 -
Flags: review?(nfroyd) → review+
![]() |
||
Comment 4•7 years ago
|
||
Comment on attachment 8719994 [details] [diff] [review] Part 2 - Extract the AddRef/Release calls into a non-inner helper trait. v1 Review of attachment 8719994 [details] [diff] [review]: ----------------------------------------------------------------- r=me with some additional documentation. ::: mfbt/RefPtr.h @@ +20,5 @@ > namespace mozilla { > template<class T> class OwningNonNull; > + > +template<class U> > +struct RefPtrTraits Could you please write a bit of documentation here? Seomthing about how the canonical way to refcount with RefPtr is to use AddRef and Release methods, but if you have a pointer type that has differently-named methods, you can use specializations of RefPtrTraits to call those methods instead? Please also document that U should not be a |const|-qualified type, or add a static_assert to verify !IsConst<U>::value.
Attachment #8719994 -
Flags: review?(nfroyd) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9431b91f570 https://hg.mozilla.org/integration/mozilla-inbound/rev/5039eb1fa76c
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c9431b91f570 https://hg.mozilla.org/mozilla-central/rev/5039eb1fa76c https://hg.mozilla.org/mozilla-central/rev/b8231765b22c
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•