Bug 138331 - Allow implicit conversion from Ref<T> to T&
Summary: Allow implicit conversion from Ref<T> to T&
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-03 15:59 PST by Chris Dumez
Modified: 2014-11-03 23:22 PST (History)
6 users (show)

See Also:


Attachments
Patch (37.08 KB, patch)
2014-11-03 16:09 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (40.03 KB, patch)
2014-11-03 21:23 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2014-11-03 15:59:28 PST
Allow implicit conversion from Ref<T> to T& to reduce the amount of Ref<>::get() calls in the code and increase readability. Unlike for RefPtr, doing this for Ref should not be error prone.
Comment 1 Chris Dumez 2014-11-03 16:09:12 PST
Created attachment 240880 [details]
Patch
Comment 2 Andreas Kling 2014-11-03 18:28:45 PST
I kinda like this. Paging Darin for 2nd opinion.
Comment 3 Darin Adler 2014-11-03 18:43:56 PST
I like it too. Unless we have to get rid of Ref completely.
Comment 4 Chris Dumez 2014-11-03 21:23:42 PST
Created attachment 240910 [details]
Patch
Comment 5 Andreas Kling 2014-11-03 22:42:38 PST
(In reply to comment #3)
> I like it too. Unless we have to get rid of Ref completely.

We do? Let's find time to discuss that in person at some point.
Comment 6 Andreas Kling 2014-11-03 22:42:51 PST
Comment on attachment 240910 [details]
Patch

r=me on this.
Comment 7 WebKit Commit Bot 2014-11-03 23:22:13 PST
Comment on attachment 240910 [details]
Patch

Clearing flags on attachment: 240910

Committed r175513: <http://trac.webkit.org/changeset/175513>
Comment 8 WebKit Commit Bot 2014-11-03 23:22:18 PST
All reviewed patches have been landed.  Closing bug.