Bug 144841 - Use Ref instead of PassRefPtr in WebCore/page
Summary: Use Ref instead of PassRefPtr in WebCore/page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks: 144092
  Show dependency treegraph
 
Reported: 2015-05-09 20:58 PDT by Gyuyoung Kim
Modified: 2015-05-10 22:54 PDT (History)
8 users (show)

See Also:


Attachments
Patch (53.86 KB, patch)
2015-05-09 21:00 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (58.74 KB, patch)
2015-05-10 01:04 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (59.84 KB, patch)
2015-05-10 02:23 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch for landing (61.97 KB, patch)
2015-05-10 18:33 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch for landing (61.97 KB, patch)
2015-05-10 19:25 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 2015-05-09 20:58:46 PDT
To kill PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr in WebCore/page.
Comment 1 Gyuyoung Kim 2015-05-09 21:00:24 PDT
Created attachment 252803 [details]
Patch
Comment 2 Gyuyoung Kim 2015-05-10 01:04:08 PDT
Created attachment 252806 [details]
Patch
Comment 3 Gyuyoung Kim 2015-05-10 02:23:00 PDT
Created attachment 252808 [details]
Patch
Comment 4 Darin Adler 2015-05-10 13:43:51 PDT
Comment on attachment 252808 [details]
Patch

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

OK to check in as long as you get iOS building.

> Source/WebCore/page/TextIndicator.h:86
>      WEBCORE_EXPORT static PassRefPtr<TextIndicator> createWithSelectionInFrame(Frame&, TextIndicatorPresentationTransition);
>      WEBCORE_EXPORT static PassRefPtr<TextIndicator> createWithRange(const Range&, TextIndicatorPresentationTransition);

Why did these two end up untouched?

> Source/WebCore/page/WebKitPoint.h:39
> +            return adoptRef(*new WebKitPoint());

I like to omit the optional () in cases like this.

> Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp:44
> -RefPtr<ScrollingTreeIOS> ScrollingTreeIOS::create(AsyncScrollingCoordinator* scrollingCoordinator)
> +Ref<ScrollingTreeIOS> ScrollingTreeIOS::create(AsyncScrollingCoordinator* scrollingCoordinator)

page/scrolling/ios/ScrollingTreeIOS.cpp:44:41: error: return type of out-of-line definition of 'WebCore::ScrollingTreeIOS::create' differs from that in the declaration

Need to modify the header too.
Comment 5 Gyuyoung Kim 2015-05-10 18:33:12 PDT
Created attachment 252834 [details]
Patch for landing
Comment 6 Gyuyoung Kim 2015-05-10 19:23:55 PDT
(In reply to comment #4)
> Comment on attachment 252808 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=252808&action=review
> 
> OK to check in as long as you get iOS building.

Yes, fixed.

> > Source/WebCore/page/TextIndicator.h:86
> >      WEBCORE_EXPORT static PassRefPtr<TextIndicator> createWithSelectionInFrame(Frame&, TextIndicatorPresentationTransition);
> >      WEBCORE_EXPORT static PassRefPtr<TextIndicator> createWithRange(const Range&, TextIndicatorPresentationTransition);
> 
> Why did these two end up untouched?

Oh, I missed. Fixed too.
 
> > Source/WebCore/page/WebKitPoint.h:39
> > +            return adoptRef(*new WebKitPoint());
> 
> I like to omit the optional () in cases like this.
> 
> > Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp:44
> > -RefPtr<ScrollingTreeIOS> ScrollingTreeIOS::create(AsyncScrollingCoordinator* scrollingCoordinator)
> > +Ref<ScrollingTreeIOS> ScrollingTreeIOS::create(AsyncScrollingCoordinator* scrollingCoordinator)
> 
> page/scrolling/ios/ScrollingTreeIOS.cpp:44:41: error: return type of
> out-of-line definition of 'WebCore::ScrollingTreeIOS::create' differs from
> that in the declaration
> 
> Need to modify the header too.

ditto.
Comment 7 Gyuyoung Kim 2015-05-10 19:25:51 PDT
Created attachment 252835 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2015-05-10 22:54:46 PDT
Comment on attachment 252835 [details]
Patch for landing

Clearing flags on attachment: 252835

Committed r184066: <http://trac.webkit.org/changeset/184066>
Comment 9 WebKit Commit Bot 2015-05-10 22:54:51 PDT
All reviewed patches have been landed.  Closing bug.