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

Unified Diff: gpu/command_buffer/service/common_decoder.cc

Issue 5383001: Revert 67293 BrowserTestCanLaunchWithOSMesa was consistently failing - Initia... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/common_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/common_decoder.cc
===================================================================
--- gpu/command_buffer/service/common_decoder.cc (revision 67327)
+++ gpu/command_buffer/service/common_decoder.cc (working copy)
@@ -35,16 +35,11 @@
return false;
}
-void CommonDecoder::Bucket::SetFromString(const char* str) {
+void CommonDecoder::Bucket::SetFromString(const std::string& str) {
// Strings are passed NULL terminated to distinguish between empty string
// and no string.
- if (!str) {
- SetSize(0);
- } else {
- size_t size = strlen(str) + 1;
- SetSize(size);
- SetData(str, 0, size);
- }
+ SetSize(str.size() + 1);
+ SetData(str.c_str(), 0, str.size() + 1);
}
bool CommonDecoder::Bucket::GetAsString(std::string* str) {
« no previous file with comments | « gpu/command_buffer/service/common_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698