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

Issue 1458513002: Implement StringUTF8Adaptor::asStringPiece. (Closed)

Created:
5 years, 1 month ago by jbroman
Modified:
5 years 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

Implement StringUTF8Adaptor::asStringPiece. Permit //base/strings in WTF to support this. Committed: https://crrev.com/cf7c1936b965a9771538b2e18a183115a431d8fc Cr-Commit-Position: refs/heads/master@{#360727}

Patch Set 1 #

Patch Set 2 : Add //base to wtf's public_deps. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M third_party/WebKit/Source/wtf/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/wtf/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringUTF8Adaptor.h View 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (11 generated)
jbroman
This is how I'd like to resolve the "many copies" issue you mentioned in my ...
5 years, 1 month ago (2015-11-17 20:43:43 UTC) #3
esprehn
This seems fine, jyasskin suggested we might use an operator to make this incantation shorter.
5 years, 1 month ago (2015-11-17 21:09:14 UTC) #5
jbroman
On 2015/11/17 at 21:09:14, esprehn wrote: > This seems fine, jyasskin suggested we might use ...
5 years, 1 month ago (2015-11-17 21:10:47 UTC) #6
jbroman
ping jyasskin?
5 years, 1 month ago (2015-11-19 16:25:47 UTC) #7
esprehn
lgtm, this is easy to change later so lets start here.
5 years, 1 month ago (2015-11-19 20:12:25 UTC) #8
Jeffrey Yasskin
LGTM as-is or with an operator base::StringPiece. The implicit conversion is ok (and IMO preferable) ...
5 years, 1 month ago (2015-11-19 21:01:08 UTC) #9
jbroman
landing as-is on the basis of esprehn's "lets start here"; deleting all calls to asStringPiece ...
5 years, 1 month ago (2015-11-19 21:37:14 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458513002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458513002/20001
5 years, 1 month ago (2015-11-19 21:38:45 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, no build URL)
5 years, 1 month ago (2015-11-19 22:19:06 UTC) #14
jbroman
Whoops, forgot neither esprehn nor jyasskin is in wtf/OWNERS. +haraken for wtf/OWNERS
5 years, 1 month ago (2015-11-19 22:21:08 UTC) #16
haraken
On 2015/11/19 22:21:08, jbroman wrote: > Whoops, forgot neither esprehn nor jyasskin is in wtf/OWNERS. ...
5 years, 1 month ago (2015-11-19 23:20:02 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458513002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458513002/20001
5 years, 1 month ago (2015-11-19 23:23:44 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, no build URL)
5 years, 1 month ago (2015-11-19 23:41:41 UTC) #21
jbroman
Apparently I need a base/ owner in order to use base::StringPiece? danakj, mind stamping this?
5 years, 1 month ago (2015-11-20 00:46:16 UTC) #23
danakj
DEPS LGTM
5 years, 1 month ago (2015-11-20 00:47:39 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458513002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458513002/20001
5 years, 1 month ago (2015-11-20 00:52:42 UTC) #26
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-11-20 02:44:24 UTC) #27
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/cf7c1936b965a9771538b2e18a183115a431d8fc Cr-Commit-Position: refs/heads/master@{#360727}
5 years, 1 month ago (2015-11-20 02:45:59 UTC) #28
Yuta Kitamura
Are we going to allow using base:: stuff outside wtf/, like from core/ or platform/? ...
5 years ago (2015-12-09 10:37:23 UTC) #30
haraken
On 2015/12/09 10:37:23, Yuta Kitamura wrote: > Are we going to allow using base:: stuff ...
5 years ago (2015-12-09 11:38:00 UTC) #31
jbroman
On 2015/12/09 at 11:38:00, haraken wrote: > On 2015/12/09 10:37:23, Yuta Kitamura wrote: > > ...
5 years ago (2015-12-09 14:25:53 UTC) #32
haraken
On 2015/12/09 14:25:53, jbroman wrote: > On 2015/12/09 at 11:38:00, haraken wrote: > > On ...
5 years ago (2015-12-09 15:00:35 UTC) #33
Yuta Kitamura
On 2015/12/09 15:00:35, haraken wrote: > On 2015/12/09 14:25:53, jbroman wrote: > > On 2015/12/09 ...
5 years ago (2015-12-10 06:11:44 UTC) #34
haraken
On 2015/12/10 06:11:44, Yuta Kitamura wrote: > On 2015/12/09 15:00:35, haraken wrote: > > On ...
5 years ago (2015-12-10 06:18:39 UTC) #35
jbroman
5 years ago (2015-12-10 12:54:23 UTC) #36
Message was sent while issue was closed.
On 2015/12/10 at 06:18:39, haraken wrote:
> On 2015/12/10 06:11:44, Yuta Kitamura wrote:
> > On 2015/12/09 15:00:35, haraken wrote:
> > > On 2015/12/09 14:25:53, jbroman wrote:
> > > > On 2015/12/09 at 11:38:00, haraken wrote:
> > > > > On 2015/12/09 10:37:23, Yuta Kitamura wrote:
> > > > > > Are we going to allow using base:: stuff outside wtf/,
> > > > > > like from core/ or platform/? My understanding is "no",
> > > > > > and if my understanding is correct, this change makes less
> > > > > > sense.
> > > > > 
> > > > > Correct. The answer is no.
> > > > 
> > > > It has to be allowed in platform/, because base types are part of the
> > > interface
> > > > of cc etc., and those are now permitted in platform/. I agree that it
makes
> > > > sense to ban from core/.
> > > 
> > > Sorry, I wrote the reply without reading the context well :/ You're right,
> > base/
> > > is allowed in wtf/ and platform/ and not allowed in other places.
> > 
> > OK, but let's get back to the original question: is it okay to have
> > a function returning base::StringPiece in WTF? No, right?
> 
> Ah, now I understand your question. That makes sense.
> 
> jbroman@: Where is the StringUTF8Adaptor::asStringPiece going to be used?

I would only consider it legitimate (under the current rules) to call this in
places that can otherwise access base/. 

I do think it's reasonable for WTF to provide code that allows conversion
between WTF and base types, to be used by code that must deal with code (like
platform/).
Currently it's called in GraphicsLayer's implementation of
cc::LayerClient::TakeDebugInfo
(https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit...).

Powered by Google App Engine
This is Rietveld 408576698