Bug 138995 - Convert PassRefPtr return types to RefPtr.
Summary: Convert PassRefPtr return types to RefPtr.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-21 20:31 PST by Andreas Kling
Modified: 2014-11-22 01:11 PST (History)
1 user (show)

See Also:


Attachments
Phase I (235.80 KB, patch)
2014-11-21 20:33 PST, Andreas Kling
andersca: review+
Details | Formatted Diff | Diff
Phase I (221.59 KB, patch)
2014-11-21 21:22 PST, Andreas Kling
no flags Details | Formatted Diff | Diff
Phase I (223.41 KB, patch)
2014-11-21 22:34 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2014-11-21 20:31:08 PST
These days it's fine to return a RefPtr rather than a PassRefPtr.
The code generated will be the same, and we've already started doing it when writing new code.
This bug will be about bulk-converting more code.
Comment 1 Andreas Kling 2014-11-21 20:33:05 PST
Created attachment 242104 [details]
Phase I
Comment 2 WebKit Commit Bot 2014-11-21 20:34:19 PST
Attachment 242104 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/js/JSDOMBinding.h:368:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:64:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:65:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:66:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:67:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:68:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:69:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:70:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:71:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:72:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:73:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:74:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:75:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:76:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:77:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:78:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:79:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:80:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:81:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:82:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/html/HTMLDetailsElement.h:30:  The parameter name "document" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:987:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:987:  The parameter name "resolver" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:988:  The parameter name "ec" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:988:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:991:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:992:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:993:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:994:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:992:  The parameter name "resolver" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:994:  The parameter name "result" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:995:  The parameter name "ec" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:995:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 33 in 201 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andreas Kling 2014-11-21 21:22:30 PST
Created attachment 242108 [details]
Phase I
Comment 4 WebKit Commit Bot 2014-11-21 21:27:31 PST
Attachment 242108 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/js/JSDOMBinding.h:368:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:64:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:65:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:66:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:67:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:68:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:69:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:70:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:71:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:72:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:73:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:74:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:75:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:76:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:77:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:78:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:79:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:80:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:81:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/svg/SVGPathElement.h:82:  The parameter name "role" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/html/HTMLDetailsElement.h:30:  The parameter name "document" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:987:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:987:  The parameter name "resolver" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:988:  The parameter name "ec" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:988:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:991:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:992:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:993:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:994:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/Document.h:992:  The parameter name "resolver" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:994:  The parameter name "result" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:995:  The parameter name "ec" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/Document.h:995:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 33 in 206 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Andreas Kling 2014-11-21 22:34:28 PST
Created attachment 242112 [details]
Phase I
Comment 6 WebKit Commit Bot 2014-11-21 22:36:29 PST
Attachment 242112 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/js/JSDOMBinding.h:368:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 1 in 207 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Commit Bot 2014-11-22 01:11:51 PST
Comment on attachment 242112 [details]
Phase I

Clearing flags on attachment: 242112

Committed r176502: <http://trac.webkit.org/changeset/176502>
Comment 8 WebKit Commit Bot 2014-11-22 01:11:55 PST
All reviewed patches have been landed.  Closing bug.