Bug 138995

Summary: Convert PassRefPtr return types to RefPtr.
Product: WebKit Reporter: Andreas Kling <kling>
Component: PlatformAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Phase I
andersca: review+
Phase I
none
Phase I none

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.