Bug 136931 - Allow DOM methods to return references instead of pointers
Summary: Allow DOM methods to return references instead of pointers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-18 15:15 PDT by Chris Dumez
Modified: 2014-09-19 12:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (25.21 KB, patch)
2014-09-18 15:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (25.95 KB, patch)
2014-09-18 17:03 PDT, 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-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!