Bug 144841

Summary: Use Ref instead of PassRefPtr in WebCore/page
Product: WebKit Reporter: Gyuyoung Kim <gyuyoung.kim>
Component: New BugsAssignee: Gyuyoung Kim <gyuyoung.kim>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, commit-queue, dino, dstockwell, jamesr, luiz, simon.fraser, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 144092    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing
none
Patch for landing none

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.