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

Issue 2227903002: String::contains should use StringView. (Closed)

Created:
4 years, 4 months ago by esprehn
Modified:
4 years, 4 months ago
Reviewers:
haraken, Yuta Kitamura
CC:
blink-reviews, blink-reviews-wtf_chromium.org, chromium-reviews, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

String::contains should use StringView. By happy accident the template overload of contains made the patch in https://codereview.chromium.org/2225173002 remove all of the String allocations for contains callers. Unfortunately it didn't fix AtomicString which didn't use a template. Lets make the API surface consistent across AtomicString and String and fix all the string allocations for AtomicString::contains(). BUG=615174 Committed: https://crrev.com/95f6bad9ec8883e5596a3069ea3458c109a01ca5 Cr-Commit-Position: refs/heads/master@{#410590}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -12 lines) Patch
M third_party/WebKit/Source/platform/network/HTTPParsers.cpp View 1 chunk +4 lines, -1 line 1 comment Download
M third_party/WebKit/Source/wtf/text/AtomicString.h View 2 chunks +4 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFString.h View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
esprehn
4 years, 4 months ago (2016-08-09 04:17:41 UTC) #5
esprehn
https://codereview.chromium.org/2227903002/diff/1/third_party/WebKit/Source/platform/network/HTTPParsers.cpp File third_party/WebKit/Source/platform/network/HTTPParsers.cpp (left): https://codereview.chromium.org/2227903002/diff/1/third_party/WebKit/Source/platform/network/HTTPParsers.cpp#oldcode189 third_party/WebKit/Source/platform/network/HTTPParsers.cpp:189: return name.containsOnlyLatin1() && !name.contains('\r') && !name.contains('\n') && !name.contains(static_cast<UChar>('\0')); There's ...
4 years, 4 months ago (2016-08-09 04:39:05 UTC) #7
haraken
Nice catch! LGTM.
4 years, 4 months ago (2016-08-09 04:46:23 UTC) #8
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/2227903002/1
4 years, 4 months ago (2016-08-09 05:00:42 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-09 05:41:11 UTC) #12
commit-bot: I haz the power
4 years, 4 months ago (2016-08-09 05:42:45 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/95f6bad9ec8883e5596a3069ea3458c109a01ca5
Cr-Commit-Position: refs/heads/master@{#410590}

Powered by Google App Engine
This is Rietveld 408576698