Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Issue 2655013004: Make WebString::equal take the length for const char* too (Closed)

Created:
3 years, 10 months ago by kinuko
Modified:
3 years, 10 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, dglazkov+blink, kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make WebString::equal take the length for const char* too This makes strlen calls optimized away for literal strings. (Verified a few callsites to see the strlen actually gets replaced with immediate values for literal strings) BUG=667131 Review-Url: https://codereview.chromium.org/2655013004 Cr-Commit-Position: refs/heads/master@{#446322} Committed: https://chromium.googlesource.com/chromium/src/+/56bb6b406b0a1cbfbc9b21fcbcaac6bd16e7e9a9

Patch Set 1 #

Total comments: 4

Patch Set 2 : null crash fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -6 lines) Patch
M third_party/WebKit/Source/platform/exported/WebString.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/WebString.h View 1 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 20 (12 generated)
kinuko
Mind taking a look?
3 years, 10 months ago (2017-01-26 07:15:39 UTC) #5
esprehn
You need to null check before calling strlen, lgtm w/ that fixed. https://codereview.chromium.org/2655013004/diff/1/third_party/WebKit/public/platform/WebString.h File third_party/WebKit/public/platform/WebString.h ...
3 years, 10 months ago (2017-01-26 08:36:54 UTC) #6
kinuko
https://codereview.chromium.org/2655013004/diff/1/third_party/WebKit/public/platform/WebString.h File third_party/WebKit/public/platform/WebString.h (right): https://codereview.chromium.org/2655013004/diff/1/third_party/WebKit/public/platform/WebString.h#newcode232 third_party/WebKit/public/platform/WebString.h:232: return a.equals(b, strlen(b)); On 2017/01/26 08:36:54, esprehn wrote: > ...
3 years, 10 months ago (2017-01-26 09:41:04 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2655013004/20001
3 years, 10 months ago (2017-01-26 09:41:24 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/220842)
3 years, 10 months ago (2017-01-26 11:37:22 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2655013004/20001
3 years, 10 months ago (2017-01-26 12:43:00 UTC) #16
Charlie Harrison
lgtm
3 years, 10 months ago (2017-01-26 12:51:52 UTC) #17
commit-bot: I haz the power
3 years, 10 months ago (2017-01-26 14:36:54 UTC) #20
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/56bb6b406b0a1cbfbc9b21fcbcaa...

Powered by Google App Engine
This is Rietveld 408576698