Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 2ef58fde9da13399cf0461e996e2eb6b601154c4..dc091f3a9cd888da651d4d9e100745cc7e3ae538 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -22431,14 +22431,13 @@ void StoringEventLoggerCallback(const char* message, int status) { |
TEST(EventLogging) { |
v8::Isolate* isolate = CcTest::isolate(); |
isolate->SetEventLogger(StoringEventLoggerCallback); |
- v8::internal::HistogramTimer* histogramTimer = |
- new v8::internal::HistogramTimer( |
- "V8.Test", 0, 10000, 50, |
- reinterpret_cast<v8::internal::Isolate*>(isolate)); |
- histogramTimer->Start(); |
+ v8::internal::HistogramTimer histogramTimer( |
+ "V8.Test", 0, 10000, 50, |
+ reinterpret_cast<v8::internal::Isolate*>(isolate)); |
+ histogramTimer.Start(); |
CHECK_EQ("V8.Test", last_event_message); |
CHECK_EQ(0, last_event_status); |
- histogramTimer->Stop(); |
+ histogramTimer.Stop(); |
CHECK_EQ("V8.Test", last_event_message); |
CHECK_EQ(1, last_event_status); |
} |