| Index: gpu/command_buffer/service/common_decoder.cc
|
| ===================================================================
|
| --- gpu/command_buffer/service/common_decoder.cc (revision 67161)
|
| +++ gpu/command_buffer/service/common_decoder.cc (working copy)
|
| @@ -35,11 +35,16 @@
|
| return false;
|
| }
|
|
|
| -void CommonDecoder::Bucket::SetFromString(const std::string& str) {
|
| +void CommonDecoder::Bucket::SetFromString(const char* str) {
|
| // Strings are passed NULL terminated to distinguish between empty string
|
| // and no string.
|
| - SetSize(str.size() + 1);
|
| - SetData(str.c_str(), 0, str.size() + 1);
|
| + if (!str) {
|
| + SetSize(0);
|
| + } else {
|
| + size_t size = strlen(str) + 1;
|
| + SetSize(size);
|
| + SetData(str, 0, size);
|
| + }
|
| }
|
|
|
| bool CommonDecoder::Bucket::GetAsString(std::string* str) {
|
|
|