Open
Bug 1270687
Opened 10 years ago
Updated 3 days ago
Replace all naked 'new's of reference-counted classes with calls to MakeAndAddRef<T>
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
NEW
People
(Reporter: nika, Unassigned)
References
(Depends on 2 open bugs, Blocks 1 open bug)
Details
This is needed to be able to do nice things such as the change in bug 1270638.
Comment 1•10 years ago
|
||
Let's discuss this on m.d.platform first, shall we?
Updated•3 years ago
|
Severity: normal → S3
Comment 2•5 days ago
|
||
Note, classes with private constructors require a bit of special handling & special consideration here - see bug 1186012 comment 2.
Comment 3•3 days ago
•
|
||
Also note for folks working on conversions in the spirit of this bug: along with MakeAndAddRef<T> in this bug's title, we now also have MakeRefPtr<T> (added in bug 1354642, after this bug here was filed), which arguably a bit easier to read and is just as good for many use cases.
It has the same benefit of instantly AddRef'ing. The only difference is the return type (RefPtr vs already_AddRefed), and in many cases it doesn't really matter which one we're returning.
You need to log in
before you can comment on or make changes to this bug.
Description
•