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

Unified Diff: src/platform-macos.cc

Issue 6001012: Avoid using std::string in Max OS platform file. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 12 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-macos.cc
===================================================================
--- src/platform-macos.cc (revision 6144)
+++ src/platform-macos.cc (working copy)
@@ -52,8 +52,6 @@
#include <stdlib.h>
#include <errno.h>
-#include <string>
-
#undef MAP_TYPE
#include "v8.h"
@@ -437,9 +435,10 @@
return;
// Mac OS X does not expose the length limit of the name, so hardcode it.
- const int kMaxNameLength = 63;
- std::string shortened_name = std::string(name).substr(0, kMaxNameLength);
- dynamic_pthread_setname_np(shortened_name.c_str());
+ static const int kMaxNameLength = 63;
+ USE(kMaxNameLength);
+ ASSERT(kMaxThreadNameLength <= kMaxNameLength);
+ dynamic_pthread_setname_np(name);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698