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

Issue 2659023002: Re-add WebString::equals that takes const char* only (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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Re-add WebString::equals that takes const char* only I replaced this with the one that takes length, but it forced other callsites that were manually calling equals() with literals to call strlen(). This fixes it to readd the version that only takes const char*. BUG=667131 R=esprehn@chromium.org, csharrison@chromium.org Review-Url: https://codereview.chromium.org/2659023002 Cr-Commit-Position: refs/heads/master@{#446651} Committed: https://chromium.googlesource.com/chromium/src/+/1a681e3ecb0e8885fff42917be3c942fd05e0984

Patch Set 1 #

Patch Set 2 : simplify the == one #

Patch Set 3 : removes ::fromUTF8(const char*) too #

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

Messages

Total messages: 15 (7 generated)
kinuko
PTL-- thanks!
3 years, 10 months ago (2017-01-27 07:02:24 UTC) #3
esprehn
It occurs to me this is a behavior change where we make all char* strings ...
3 years, 10 months ago (2017-01-27 09:28:21 UTC) #6
kinuko
On 2017/01/27 09:28:21, esprehn wrote: > It occurs to me this is a behavior change ...
3 years, 10 months ago (2017-01-27 10:30:47 UTC) #7
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/2659023002/40001
3 years, 10 months ago (2017-01-27 10:51:26 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/1a681e3ecb0e8885fff42917be3c942fd05e0984
3 years, 10 months ago (2017-01-27 12:39:22 UTC) #12
Charlie Harrison
I am a bit confused how callers using str.equals("literal") were calling into strlen with the ...
3 years, 10 months ago (2017-01-27 13:23:57 UTC) #13
kinuko
On 2017/01/27 13:23:57, Charlie Harrison wrote: > I am a bit confused how callers using ...
3 years, 10 months ago (2017-01-27 15:39:48 UTC) #14
Charlie Harrison
3 years, 10 months ago (2017-01-27 15:42:31 UTC) #15
Message was sent while issue was closed.
Great catch then! That is very undesirable, much worse than extra strlens.

lgtm

Powered by Google App Engine
This is Rietveld 408576698