Bug 155579 - Reduce uses of PassRefPtr in WebCore/dom - 6
Summary: Reduce uses of PassRefPtr in WebCore/dom - 6
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-17 01:08 PDT by Gyuyoung Kim
Modified: 2016-03-20 23:05 PDT (History)
4 users (show)

See Also:


Attachments
Patch (8.48 KB, patch)
2016-03-17 01:09 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (15.73 KB, patch)
2016-03-18 02:23 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (18.28 KB, patch)
2016-03-19 00:44 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (19.75 KB, patch)
2016-03-20 21:24 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2016-03-17 01:08:39 PDT
SSIA
Comment 1 Gyuyoung Kim 2016-03-17 01:09:26 PDT
Created attachment 274269 [details]
Patch
Comment 2 Gyuyoung Kim 2016-03-18 02:23:53 PDT
Created attachment 274400 [details]
Patch
Comment 3 Gyuyoung Kim 2016-03-19 00:44:54 PDT
Created attachment 274512 [details]
Patch
Comment 4 Darin Adler 2016-03-19 09:34:57 PDT
Comment on attachment 274512 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=274512&action=review

Seems like some more of these should be Ref rather than RefPtr; Iā€™m not sure they all need to support nulls.

> Source/WebCore/dom/EventContext.h:46
> +    EventContext(RefPtr<Node>&&, RefPtr<EventTarget>&& currentTarget, RefPtr<EventTarget>&&);

The single code path that makes all of these in EventPath does not pass ownership of anything. All three arguments should be raw pointers, not RefPtr&&.
Comment 5 Gyuyoung Kim 2016-03-20 21:24:15 PDT
Created attachment 274572 [details]
Patch
Comment 6 Gyuyoung Kim 2016-03-20 22:13:43 PDT
(In reply to comment #4)
> Comment on attachment 274512 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=274512&action=review
 
> > Source/WebCore/dom/EventContext.h:46
> > +    EventContext(RefPtr<Node>&&, RefPtr<EventTarget>&& currentTarget, RefPtr<EventTarget>&&);
> 
> The single code path that makes all of these in EventPath does not pass
> ownership of anything. All three arguments should be raw pointers, not
> RefPtr&&.

Fixed.
Comment 7 WebKit Commit Bot 2016-03-20 23:05:52 PDT
Comment on attachment 274572 [details]
Patch

Clearing flags on attachment: 274572

Committed r198483: <http://trac.webkit.org/changeset/198483>
Comment 8 WebKit Commit Bot 2016-03-20 23:05:57 PDT
All reviewed patches have been landed.  Closing bug.