Bug 139939 - Convert more creator functions to return Ref instead of PassRefPtr.
Summary: Convert more creator functions to return Ref instead of PassRefPtr.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-24 19:23 PST by Andreas Kling
Modified: 2014-12-25 14:44 PST (History)
3 users (show)

See Also:


Attachments
Patch (295.19 KB, patch)
2014-12-24 19:25 PST, Andreas Kling
no flags Details | Formatted Diff | Diff
Patch (297.10 KB, patch)
2014-12-24 19:38 PST, Andreas Kling
no flags Details | Formatted Diff | Diff
Patch (297.71 KB, patch)
2014-12-24 21:44 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-12-24 19:23:57 PST
Yeah!
Comment 1 Andreas Kling 2014-12-24 19:25:22 PST
Created attachment 243734 [details]
Patch
Comment 2 WebKit Commit Bot 2014-12-24 19:28:11 PST
Attachment 243734 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/filters/FEComponentTransfer.h:66:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:32:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:33:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:50:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:51:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:72:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/loader/FormSubmission.h:92:  The parameter name "event" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/platform/graphics/filters/FETile.h:32:  The parameter name "filter" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:86:  The parameter name "acceleration" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:87:  The parameter name "rotationRate" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:87:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/graphics/filters/FEFlood.h:33:  The parameter name "filter" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 12 in 300 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andreas Kling 2014-12-24 19:38:12 PST
Created attachment 243735 [details]
Patch
Comment 4 WebKit Commit Bot 2014-12-24 19:39:18 PST
Attachment 243735 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/filters/FEComponentTransfer.h:66:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:32:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:33:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:50:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:51:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:72:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/loader/FormSubmission.h:92:  The parameter name "event" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/platform/graphics/filters/FETile.h:32:  The parameter name "filter" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:86:  The parameter name "acceleration" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:87:  The parameter name "rotationRate" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:87:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/graphics/filters/FEFlood.h:33:  The parameter name "filter" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 12 in 303 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Andreas Kling 2014-12-24 21:44:25 PST
Created attachment 243737 [details]
Patch
Comment 6 WebKit Commit Bot 2014-12-24 21:47:08 PST
Attachment 243737 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/filters/FEComponentTransfer.h:66:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:32:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:33:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:50:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:51:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/dom/DeviceMotionData.cpp:72:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/loader/FormSubmission.h:92:  The parameter name "event" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/platform/graphics/filters/FETile.h:32:  The parameter name "filter" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:86:  The parameter name "acceleration" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:87:  The parameter name "rotationRate" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebCore/dom/DeviceMotionData.h:87:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/graphics/filters/FEFlood.h:33:  The parameter name "filter" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 12 in 304 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Darin Adler 2014-12-24 22:28:38 PST
Comment on attachment 243737 [details]
Patch

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

I see no problems.

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:2130
> +    template<class T>

typename instead of class?

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:2131
> +    JSValue getJSValue(T& nativeObj)

Why does this function have “get” in its name?

> Source/WebCore/dom/DeviceMotionData.cpp:33
> +Ref<DeviceMotionData::Acceleration> DeviceMotionData::Acceleration::create(bool canProvideX, double x,
> +                                                                           bool canProvideY, double y,
> +                                                                           bool canProvideZ, double z)

Yuck, high maintenance formatting. All one one line maybe? Maybe use auto for the result type so we don’t have to say DeviceMotionData:: for the return type?

I won’t repeat the comment, though.
Comment 8 WebKit Commit Bot 2014-12-24 23:50:25 PST
Comment on attachment 243737 [details]
Patch

Clearing flags on attachment: 243737

Committed r177733: <http://trac.webkit.org/changeset/177733>
Comment 9 WebKit Commit Bot 2014-12-24 23:50:28 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 mitz 2014-12-25 14:44:31 PST
(In reply to comment #10)
> This broke Windows build:
> https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/
> 66094/steps/compile-webkit/logs/stdio

I attempted a fix in <http://trac.webkit.org/r177740>. Not sure if the errors being seen after that are related.