See bug 923554 for the reasoning. Specifically I think we should remove all three operators from that class and stick to calling get() explicitly.
Created attachment 814611 [details] [diff] [review] WIP! 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.
I posted about this to dev.platform.
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
(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>
You need to log in before you can comment on or make changes to this bug.