WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
138361
Add ptr() method to Ref class
https://bugs.webkit.org/show_bug.cgi?id=138361
Summary
Add ptr() method to Ref class
Chris Dumez
Reported
2014-11-04 10:23:13 PST
It is a very common pattern in our code base to get a pointer from a Ref object. Right now, we have to call Ref.get() and take its address which is not very nice IMHO. I propose we add a asPtr() method to Ref class to get a raw pointer, in order to simplify the code a bit.
Attachments
Patch
(117.92 KB, patch)
2014-11-04 12:13 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(117.80 KB, patch)
2014-11-04 14:15 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2014-11-04 12:13:54 PST
Created
attachment 240938
[details]
Patch
Darin Adler
Comment 2
2014-11-04 14:05:56 PST
Comment on
attachment 240938
[details]
Patch I like it. I might have named this just ptr() rather than asPtr().
Chris Dumez
Comment 3
2014-11-04 14:07:35 PST
(In reply to
comment #2
)
> Comment on
attachment 240938
[details]
> Patch > > I like it. I might have named this just ptr() rather than asPtr().
Yes, it would be shorter. I will update the patch accordingly before landing, thanks.
Chris Dumez
Comment 4
2014-11-04 14:15:16 PST
Created
attachment 240947
[details]
Patch
WebKit Commit Bot
Comment 5
2014-11-04 15:00:49 PST
Comment on
attachment 240947
[details]
Patch Clearing flags on attachment: 240947 Committed
r175583
: <
http://trac.webkit.org/changeset/175583
>
WebKit Commit Bot
Comment 6
2014-11-04 15:00:53 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