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

Unified Diff: test/cctest/test-cpu-profiler.cc

Issue 2655963003: [profiler] Fix a memory leak of CodeEvent objects (Closed)
Patch Set: Created 3 years, 11 months 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
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index 6ec71a2ab3e3bdb77717880200f044e0633b277c..6dd5966dde48a18804fb90dd9dc0195d7d36ed25 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -78,7 +78,7 @@ static const char* reason(const i::DeoptimizeReason reason) {
TEST(StartStop) {
i::Isolate* isolate = CcTest::i_isolate();
CpuProfilesCollection profiles(isolate);
- ProfileGenerator generator(isolate, &profiles);
+ ProfileGenerator generator(&profiles);
std::unique_ptr<ProfilerEventsProcessor> processor(
new ProfilerEventsProcessor(isolate, &generator,
v8::base::TimeDelta::FromMicroseconds(100)));
@@ -163,7 +163,7 @@ TEST(CodeEvents) {
i::AbstractCode* args4_code = CreateCode(&env);
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
- ProfileGenerator* generator = new ProfileGenerator(isolate, profiles);
+ ProfileGenerator* generator = new ProfileGenerator(profiles);
ProfilerEventsProcessor* processor = new ProfilerEventsProcessor(
isolate, generator, v8::base::TimeDelta::FromMicroseconds(100));
CpuProfiler profiler(isolate, profiles, generator, processor);
@@ -231,7 +231,7 @@ TEST(TickEvents) {
i::AbstractCode* frame3_code = CreateCode(&env);
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
- ProfileGenerator* generator = new ProfileGenerator(isolate, profiles);
+ ProfileGenerator* generator = new ProfileGenerator(profiles);
ProfilerEventsProcessor* processor =
new ProfilerEventsProcessor(CcTest::i_isolate(), generator,
v8::base::TimeDelta::FromMicroseconds(100));
@@ -304,7 +304,7 @@ TEST(Issue1398) {
i::AbstractCode* code = CreateCode(&env);
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
- ProfileGenerator* generator = new ProfileGenerator(isolate, profiles);
+ ProfileGenerator* generator = new ProfileGenerator(profiles);
ProfilerEventsProcessor* processor =
new ProfilerEventsProcessor(CcTest::i_isolate(), generator,
v8::base::TimeDelta::FromMicroseconds(100));
@@ -1077,7 +1077,7 @@ static void TickLines(bool optimize) {
CHECK(code_address);
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
- ProfileGenerator* generator = new ProfileGenerator(isolate, profiles);
+ ProfileGenerator* generator = new ProfileGenerator(profiles);
ProfilerEventsProcessor* processor =
new ProfilerEventsProcessor(CcTest::i_isolate(), generator,
v8::base::TimeDelta::FromMicroseconds(100));

Powered by Google App Engine
This is Rietveld 408576698