Bug 146001 - Purge PassRefPtr with Ref or RefPtr in WebKit2
Summary: Purge PassRefPtr with Ref or RefPtr in WebKit2
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-06-15 19:07 PDT by Gyuyoung Kim
Modified: 2015-06-16 20:34 PDT (History)
1 user (show)

See Also:


Attachments
Patch (62.30 KB, patch)
2015-06-15 19:08 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (62.37 KB, patch)
2015-06-15 19:15 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (64.16 KB, patch)
2015-06-15 21:56 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (64.92 KB, patch)
2015-06-15 22:01 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (65.71 KB, patch)
2015-06-15 22:10 PDT, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch (65.80 KB, patch)
2015-06-16 18:56 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-06-15 19:07:00 PDT
As step to remove PassRefPtr, this patch removes PassRefPtr in WebKit2. If function can't return nullptr, PassRefPtr is changed with Ref. If not, the function returns RefPtr.
Comment 1 Gyuyoung Kim 2015-06-15 19:08:53 PDT
Created attachment 254920 [details]
Patch
Comment 2 Gyuyoung Kim 2015-06-15 19:15:51 PDT
Created attachment 254922 [details]
Patch
Comment 3 Gyuyoung Kim 2015-06-15 21:56:16 PDT
Created attachment 254929 [details]
Patch
Comment 4 Gyuyoung Kim 2015-06-15 22:01:25 PDT
Created attachment 254930 [details]
Patch
Comment 5 Gyuyoung Kim 2015-06-15 22:10:26 PDT
Created attachment 254932 [details]
Patch
Comment 6 Darin Adler 2015-06-16 10:55:04 PDT
Comment on attachment 254932 [details]
Patch

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

> Source/WebKit2/ChangeLog:8
> +        As step to remove PassRefPtr, this patch removes PassRefPtr in WebKit2.

This wording, which we have used on a lot of patches, is wrong. The patch does not remove these from WebKIt2. It reduces the use of them in WebKit2.

> Source/WebKit2/Shared/API/APINumber.h:39
> +    static RefPtr<Number> create(NumberType value)

Why RefPtr instead of Ref here?

> Source/WebKit2/Shared/API/APISecurityOrigin.h:50
>              return 0;

nullptr

> Source/WebKit2/UIProcess/WebPageProxy.cpp:4659
> +    callback->performCallbackWithReturnValue(data.size() ? API::SerializedScriptValue::adopt(data).ptr() : 0, hadException);

nullptr
Comment 7 Gyuyoung Kim 2015-06-16 18:56:47 PDT
Created attachment 254994 [details]
Patch
Comment 8 Gyuyoung Kim 2015-06-16 19:01:30 PDT
Comment on attachment 254932 [details]
Patch

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

>> Source/WebKit2/ChangeLog:8
>> +        As step to remove PassRefPtr, this patch removes PassRefPtr in WebKit2.
> 
> This wording, which we have used on a lot of patches, is wrong. The patch does not remove these from WebKIt2. It reduces the use of them in WebKit2.

Yes, you are right. I fix this changelog. Let me write changelog in upcoming patch carefully.

>> Source/WebKit2/Shared/API/APINumber.h:39
>> +    static RefPtr<Number> create(NumberType value)
> 
> Why RefPtr instead of Ref here?

done.

>> Source/WebKit2/Shared/API/APISecurityOrigin.h:50
>>              return 0;
> 
> nullptr

done.

>> Source/WebKit2/UIProcess/WebPageProxy.cpp:4659
>> +    callback->performCallbackWithReturnValue(data.size() ? API::SerializedScriptValue::adopt(data).ptr() : 0, hadException);
> 
> nullptr

done.
Comment 9 WebKit Commit Bot 2015-06-16 20:34:07 PDT
Comment on attachment 254994 [details]
Patch

Clearing flags on attachment: 254994

Committed r185637: <http://trac.webkit.org/changeset/185637>
Comment 10 WebKit Commit Bot 2015-06-16 20:34:12 PDT
All reviewed patches have been landed.  Closing bug.