Bug 138331

Summary: Allow implicit conversion from Ref<T> to T&
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, benjamin, commit-queue, darin, kling, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.