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

Issue 2245773002: Simplify and clean up StringTypeAdaptor and StringAppend. (Closed)

Created:
4 years, 4 months ago by esprehn
Modified:
3 years, 7 months ago
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

Simplify and clean up StringTypeAdaptor and StringAppend. BUG=

Patch Set 1 #

Patch Set 2 : Fix ownership of String. #

Patch Set 3 : const ref it all. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -240 lines) Patch
M third_party/WebKit/Source/wtf/text/StringConcatenate.h View 1 2 11 chunks +56 lines, -128 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringConcatenate.cpp View 1 2 5 chunks +15 lines, -39 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringOperators.h View 1 2 1 chunk +32 lines, -73 lines 0 comments Download

Messages

Total messages: 14 (12 generated)
esprehn
Hey Scott do you understand MSVC? Not sure what I've done here that's producing different ...
4 years, 4 months ago (2016-08-13 03:28:33 UTC) #13
scottmg
4 years, 4 months ago (2016-08-15 15:26:22 UTC) #14
On 2016/08/13 03:28:33, esprehn wrote:
> Hey Scott do you understand MSVC? Not sure what I've done here that's
producing
> different results on clang vs MSVC.

I didn't fully dig in, but from a quick look, I think there's a temporary
getting destroyed that's being held in a StringTypeAdapter.

For example in bool HostIsIPAddress(const String& host)

KURL url(..., protocol + host + "/")

it's using

WTF::operator+<WTF::String>(const WTF::String&, WTF::String)

to add protocol and host. So by the time you're adding the result of those and
"/", the temporary that host was converted to is destroyed.

Powered by Google App Engine
This is Rietveld 408576698