Bug 147384 - Clean up RefPtrCairo.cpp
Summary: Clean up RefPtrCairo.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-28 16:56 PDT by Michael Catanzaro
Modified: 2015-07-29 07:32 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.48 KB, patch)
2015-07-28 16:57 PDT, Michael Catanzaro
mrobinson: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2015-07-28 16:56:23 PDT
Coding standards say: "Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons."
Comment 1 Michael Catanzaro 2015-07-28 16:57:49 PDT
Created attachment 257702 [details]
Patch
Comment 2 Martin Robinson 2015-07-28 17:03:16 PDT
Comment on attachment 257702 [details]
Patch

I cannot recall if this was due to an issue with LIKELY on some platforms. If all the bots are green though, feel free to land this.
Comment 3 Michael Catanzaro 2015-07-28 17:55:17 PDT
Windows bot has been broken for a week now, and if there was an issue with LIKELY I bet it was on Windows. :(

Would you mind if I simply get rid of all the uses of LIKELY in this patch as well? I'm pretty sure it's hocus pocus. http://stackoverflow.com/a/1851905 has a good explanation....
Comment 4 Martin Robinson 2015-07-28 17:59:53 PDT
(In reply to comment #3)
> Windows bot has been broken for a week now, and if there was an issue with
> LIKELY I bet it was on Windows. :(
> 
> Would you mind if I simply get rid of all the uses of LIKELY in this patch
> as well? I'm pretty sure it's hocus pocus.
> http://stackoverflow.com/a/1851905 has a good explanation....

That comment also says:

"Besides the useless branch hint for the predictor, __builtin_expect has its use, the compiler may reorder the code to improve cache usage or save memory."
Comment 5 Michael Catanzaro 2015-07-28 19:36:30 PDT
Comment on attachment 257702 [details]
Patch

OK, I'll keep LIKELY then, although if Intel recommends against using it I think it's _likely_ safe to remove. If it's a problem for WinCairo I guess we'll find out when the EWS is fixed... if that even is a WinCairo bot, I think it's probably AppleWindows....
Comment 6 WebKit Commit Bot 2015-07-28 19:37:57 PDT
Comment on attachment 257702 [details]
Patch

Rejecting attachment 257702 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 257702, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
-apply', '--force', '--reviewer', u'Martin Robinson']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 2 diffs from patch file(s).
patching file Source/WebCore/ChangeLog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebCore/ChangeLog.rej
patching file Source/WebCore/platform/graphics/cairo/RefPtrCairo.cpp

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Martin Robinson']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.appspot.com/results/6204930801008640
Comment 7 Michael Catanzaro 2015-07-29 07:28:12 PDT
I don't understand why webkit-patch and the commit-queue can't handle changelog updates anymore. I don't see any changes to the tools, and I'm not doing anything differently....
Comment 8 Michael Catanzaro 2015-07-29 07:32:18 PDT
Committed r187546: <http://trac.webkit.org/changeset/187546>