Bug 136931

Summary: Allow DOM methods to return references instead of pointers
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, benjamin, commit-queue, kling, koivisto, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2014-09-18 15:15:13 PDT
It is common practice in WebKit to have methods return a reference instead of a pointer if the pointer can never be null.
However, this currently does not work for DOM methods (functions called by JS bindings), which is unfortunate.

We should support this in order to use more references in the code base and for consistency.
It is especially useful when DOM methods to be used in WebCore, in addition to the generated bindings.
Comment 1 Chris Dumez 2014-09-18 15:50:29 PDT
Created attachment 238329 [details]
Patch
Comment 2 Chris Dumez 2014-09-18 17:03:54 PDT
Created attachment 238336 [details]
Patch
Comment 3 Sam Weinig 2014-09-19 10:05:51 PDT
Comment on attachment 238336 [details]
Patch

Cool.
Comment 4 WebKit Commit Bot 2014-09-19 11:33:23 PDT
Comment on attachment 238336 [details]
Patch

Clearing flags on attachment: 238336

Committed r173765: <http://trac.webkit.org/changeset/173765>
Comment 5 WebKit Commit Bot 2014-09-19 11:33:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Andreas Kling 2014-09-19 12:27:13 PDT
(In reply to comment #3)
> (From update of attachment 238336 [details])
> Cool.

Very!