Revision: 6145
Author: [email protected]
Date: Tue Jan 4 03:02:39 2011
Log: Avoid using std::string in Max OS platform file.
Review URL: http://codereview.chromium.org/6001012
http://code.google.com/p/v8/source/detail?r=6145
Modified:
/branches/bleeding_edge/src/platform-macos.cc
=======================================
--- /branches/bleeding_edge/src/platform-macos.cc Tue Jan 4 02:25:06 2011
+++ /branches/bleeding_edge/src/platform-macos.cc Tue Jan 4 03:02:39 2011
@@ -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);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev