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

Unified Diff: src/mksnapshot.cc

Issue 13011: Use char instead of wchar_t for counter names.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 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 | « src/d8.cc ('k') | src/v8-counters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mksnapshot.cc
===================================================================
--- src/mksnapshot.cc (revision 870)
+++ src/mksnapshot.cc (working copy)
@@ -48,10 +48,10 @@
class Counter {
public:
static const int kMaxNameSize = 64;
- int32_t* Bind(const wchar_t* name) {
+ int32_t* Bind(const char* name) {
int i;
for (i = 0; i < kMaxNameSize - 1 && name[i]; i++) {
- name_[i] = static_cast<char>(name[i]);
+ name_[i] = name[i];
}
name_[i] = '\0';
return &counter_;
@@ -92,13 +92,13 @@
static CounterCollection* counters = &local_counters;
-typedef std::map<std::wstring, int*> CounterMap;
-typedef std::map<std::wstring, int*>::iterator CounterMapIterator;
+typedef std::map<std::string, int*> CounterMap;
+typedef std::map<std::string, int*>::iterator CounterMapIterator;
static CounterMap counter_table_;
// Callback receiver when v8 has a counter to track.
-static int* counter_callback(const wchar_t* name) {
- std::wstring counter = name;
+static int* counter_callback(const char* name) {
+ std::string counter = name;
// See if this counter name is already known.
if (counter_table_.find(counter) != counter_table_.end())
return counter_table_[counter];
« no previous file with comments | « src/d8.cc ('k') | src/v8-counters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698