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

Side by Side Diff: test/cctest/test-serialize.cc

Issue 12820: Remove a couple of instances of wchar_t after counters change. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 26 matching lines...) Expand all
37 #include "runtime.h" 37 #include "runtime.h"
38 #include "serialize.h" 38 #include "serialize.h"
39 #include "scopeinfo.h" 39 #include "scopeinfo.h"
40 #include "snapshot.h" 40 #include "snapshot.h"
41 #include "cctest.h" 41 #include "cctest.h"
42 42
43 using namespace v8::internal; 43 using namespace v8::internal;
44 44
45 static int local_counters[256]; 45 static int local_counters[256];
46 static int counter_count = 0; 46 static int counter_count = 0;
47 static std::map<std::wstring, int> counter_table; 47 static std::map<std::string, int> counter_table;
48 48
49 49
50 // Callback receiver to track counters in test. 50 // Callback receiver to track counters in test.
51 static int* counter_function(const wchar_t* name) { 51 static int* counter_function(const char* name) {
52 std::wstring counter(name); 52 std::string counter(name);
53 if (counter_table.find(counter) == counter_table.end()) { 53 if (counter_table.find(counter) == counter_table.end()) {
54 local_counters[counter_count] = 0; 54 local_counters[counter_count] = 0;
55 counter_table[counter] = counter_count++; 55 counter_table[counter] = counter_count++;
56 } 56 }
57 57
58 return &local_counters[counter_table[counter]]; 58 return &local_counters[counter_table[counter]];
59 } 59 }
60 60
61 61
62 template <class T> 62 template <class T>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 TEST(DeserializeExtensions) { 257 TEST(DeserializeExtensions) {
258 v8::HandleScope scope; 258 v8::HandleScope scope;
259 259
260 Deserialize(); 260 Deserialize();
261 const char* c_source = "gc();"; 261 const char* c_source = "gc();";
262 v8::Local<v8::String> source = v8::String::New(c_source); 262 v8::Local<v8::String> source = v8::String::New(c_source);
263 v8::Local<v8::Script> script = v8::Script::Compile(source); 263 v8::Local<v8::Script> script = v8::Script::Compile(source);
264 v8::Local<v8::Value> value = script->Run(); 264 v8::Local<v8::Value> value = script->Run();
265 CHECK(value->IsUndefined()); 265 CHECK(value->IsUndefined());
266 } 266 }
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698