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

Issue 2146163003: Use StringView for startsWith and endsWith. (Closed)

Created:
4 years, 5 months ago by esprehn
Modified:
4 years, 5 months ago
Reviewers:
haraken, Yuta Kitamura, jrboman
CC:
apavlov+blink_chromium.org, blink-reviews, blink-reviews-wtf_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, Mikhail, pfeldman+blink_chromium.org, sergeyv+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use StringView for startsWith and endsWith. This lets us collapse lots of the code paths together, and means we can now handle startsWith(kConst) without doing a strlen or a malloc of a String object. BUG=615174 Committed: https://crrev.com/a5673d69964d773f0111e2e6a600ac180587c2f6 Cr-Commit-Position: refs/heads/master@{#405410}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -236 lines) Patch
M third_party/WebKit/Source/core/frame/csp/CSPSource.cpp View 1 chunk +1 line, -1 line 1 comment Download
M third_party/WebKit/Source/platform/inspector_protocol/String16WTF.h View 3 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/text/AtomicString.h View 2 chunks +4 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringImpl.h View 2 chunks +6 lines, -22 lines 1 comment Download
M third_party/WebKit/Source/wtf/text/StringImpl.cpp View 4 chunks +68 lines, -185 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/WTFString.h View 2 chunks +4 lines, -14 lines 0 comments Download

Messages

Total messages: 16 (9 generated)
esprehn
https://codereview.chromium.org/2146163003/diff/1/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp File third_party/WebKit/Source/core/frame/csp/CSPSource.cpp (right): https://codereview.chromium.org/2146163003/diff/1/third_party/WebKit/Source/core/frame/csp/CSPSource.cpp#newcode56 third_party/WebKit/Source/core/frame/csp/CSPSource.cpp:56: match = host.endsWith(String("." + m_host), TextCaseInsensitive); a + b ...
4 years, 5 months ago (2016-07-13 23:42:56 UTC) #3
esprehn
4 years, 5 months ago (2016-07-14 00:53:05 UTC) #5
haraken
LGTM
4 years, 5 months ago (2016-07-14 00:58:00 UTC) #6
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/2146163003/1
4 years, 5 months ago (2016-07-14 02:19:10 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-14 02:41:57 UTC) #13
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 02:42:05 UTC) #14
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 02:45:02 UTC) #16
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/a5673d69964d773f0111e2e6a600ac180587c2f6
Cr-Commit-Position: refs/heads/master@{#405410}

Powered by Google App Engine
This is Rietveld 408576698