WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
139309
PassRef should deref on destruction if pointee was not moved.
https://bugs.webkit.org/show_bug.cgi?id=139309
Summary
PassRef should deref on destruction if pointee was not moved.
Andreas Kling
Reported
2014-12-05 13:06:30 PST
Instead of having PassRef be a footgun, let's just make it deref() the pointee in ~PassRef if the object was not WTF::move()'d. This will make PassRef usable for all ::create style functions and enable idioms like Foo::create().get().doStuff();
Attachments
Patch
(6.54 KB, patch)
2014-12-05 13:11 PST
,
Andreas Kling
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2014-12-05 13:11:58 PST
Created
attachment 242652
[details]
Patch
Antti Koivisto
Comment 2
2014-12-05 13:15:25 PST
Comment on
attachment 242652
[details]
Patch Seems like a good idea
Andreas Kling
Comment 3
2014-12-05 14:20:16 PST
Comment on
attachment 242652
[details]
Patch Clearing flags on attachment: 242652 Committed
r176873
: <
http://trac.webkit.org/changeset/176873
>
Andreas Kling
Comment 4
2014-12-05 14:20:21 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug