Index: test/cctest/test-cpu-profiler.cc |
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc |
index aef56c6fec18d9a61e282545521eb147d4487e46..c8f052416fe2aad4972d300833dd39c762a75c89 100644 |
--- a/test/cctest/test-cpu-profiler.cc |
+++ b/test/cctest/test-cpu-profiler.cc |
@@ -438,7 +438,8 @@ |
static bool ContainsString(v8::Handle<v8::String> string, |
const Vector<v8::Handle<v8::String> >& vector) { |
for (int i = 0; i < vector.length(); i++) { |
- if (string->Equals(vector[i])) return true; |
+ if (string->Equals(vector[i])) |
+ return true; |
} |
return false; |
} |
@@ -449,25 +450,11 @@ |
int count = node->GetChildrenCount(); |
for (int i = 0; i < count; i++) { |
v8::Handle<v8::String> name = node->GetChild(i)->GetFunctionName(); |
- if (!ContainsString(name, names)) { |
- char buffer[100]; |
- i::SNPrintF(Vector<char>(buffer, arraysize(buffer)), |
- "Unexpected child '%s' found in '%s'", |
- *v8::String::Utf8Value(name), |
- *v8::String::Utf8Value(node->GetFunctionName())); |
- FATAL(buffer); |
- } |
+ CHECK(ContainsString(name, names)); |
// Check that there are no duplicates. |
for (int j = 0; j < count; j++) { |
if (j == i) continue; |
- if (name->Equals(node->GetChild(j)->GetFunctionName())) { |
- char buffer[100]; |
- i::SNPrintF(Vector<char>(buffer, arraysize(buffer)), |
- "Second child with the same name '%s' found in '%s'", |
- *v8::String::Utf8Value(name), |
- *v8::String::Utf8Value(node->GetFunctionName())); |
- FATAL(buffer); |
- } |
+ CHECK(!name->Equals(node->GetChild(j)->GetFunctionName())); |
} |
} |
} |
@@ -1087,10 +1074,10 @@ |
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate->heap()); |
profiles->StartProfiling("", false); |
ProfileGenerator generator(profiles); |
- SmartPointer<ProfilerEventsProcessor> processor(new ProfilerEventsProcessor( |
- &generator, NULL, v8::base::TimeDelta::FromMicroseconds(100))); |
+ ProfilerEventsProcessor* processor = new ProfilerEventsProcessor( |
+ &generator, NULL, v8::base::TimeDelta::FromMicroseconds(100)); |
processor->Start(); |
- CpuProfiler profiler(isolate, profiles, &generator, processor.get()); |
+ CpuProfiler profiler(isolate, profiles, &generator, processor); |
// Enqueue code creation events. |
i::Handle<i::String> str = factory->NewStringFromAsciiChecked(func_name); |
@@ -1100,7 +1087,7 @@ |
*str, line, column); |
// Enqueue a tick event to enable code events processing. |
- EnqueueTickSampleEvent(processor.get(), code_address); |
+ EnqueueTickSampleEvent(processor, code_address); |
processor->StopSynchronously(); |