New issue
Advanced search Search tips

Issue 903561 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Investigate mojo std::string -> base::StringPiece type-mapping

Project Member Reported by luum@chromium.org, Nov 8

Issue description

Mojo should support type-mapping for std::string to base::StringPiece automatically, but doesn't seem to be the case.

No luck following documentation and can't find any current users/consumers. Revisit pending response on g/chromium-mojo post(https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!topic/chromium-mojo/wvU3rovuhWs).
 
Do you happen to know how mojo code generation works?  Perhaps the mojo team can be convinced to allow the string -> StringPiece mapping.
I was a little misleading; by 'should support' I meant that all the docs say that Mojo does support this by default. There's even a valid StringTraits specialization for it here(1), but I'm not sure how to correctly invoke it.

Presumably I could follow the general type-mapping workflow to add the mapping but I don't think thats intended, for base::StringPiece anyways.

(1) https://cs.chromium.org/chromium/src/mojo/public/cpp/bindings/string_traits_string_piece.h?sq=package:chromium&dr=CSs&g=0

Sign in to add a comment