Reviewers: William Hesse, Description: Avoid using std::string in Max OS platform file.
Please review this at http://codereview.chromium.org/6001012/ SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/platform-macos.cc 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); } -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
