Open
Bug 924658
Opened 12 years ago
Updated 3 years ago
Only provide one explicit function for converting a WeakPtrBase into a T*
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
NEW
People
(Reporter: ehsan.akhgari, Unassigned)
Details
Attachments
(1 file)
|
642 bytes,
patch
|
Details | Diff | Splinter Review |
See bug 923554 for the reasoning. Specifically I think we should remove all three operators from that class and stick to calling get() explicitly.
| Reporter | ||
Comment 1•12 years ago
|
||
I took a stab at this. Of course this breaks the build in all sorts of ways, and the code using WeakPtr should be audited carefully to see if the weak pointers are being used in safe ways.
| Reporter | ||
Comment 2•12 years ago
|
||
I posted about this to dev.platform.
Comment 3•12 years ago
|
||
Don't forget to update the example code using a WeakPtr in a boolean context! :)
https://hg.mozilla.org/mozilla-central/file/552bca1bc885/mfbt/WeakPtr.h#l43
OS: Mac OS X → All
Hardware: x86 → All
| Reporter | ||
Comment 4•12 years ago
|
||
(In reply to comment #3)
> Don't forget to update the example code using a WeakPtr in a boolean context!
> :)
>
> https://hg.mozilla.org/mozilla-central/file/552bca1bc885/mfbt/WeakPtr.h#l43
Haha good catch, we should probably do a SafeBool thingy here <http://www.artima.com/cppsource/safebool.html>
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•