| Index: test/cctest/test-cpu-profiler.cc
|
| diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
|
| index 0e6f09d2ef0159c6aff2b0d8cebf0fc5e8c79fb8..239d8ae695106745f108324d914e09c2d5917a40 100644
|
| --- a/test/cctest/test-cpu-profiler.cc
|
| +++ b/test/cctest/test-cpu-profiler.cc
|
| @@ -12,6 +12,7 @@ namespace i = v8::internal;
|
|
|
| using i::CodeEntry;
|
| using i::CpuProfile;
|
| +using i::CpuProfiler;
|
| using i::CpuProfilesCollection;
|
| using i::ProfileGenerator;
|
| using i::ProfileNode;
|
| @@ -225,4 +226,18 @@ TEST(TickEvents) {
|
| CHECK_EQ("bbb", bottom_up_ddd_stub_children->last()->entry()->name());
|
| }
|
|
|
| +
|
| +// http://crbug/51594
|
| +// This test must not crash.
|
| +TEST(CrashIfStoppingLastNonExistentProfile) {
|
| + InitializeVM();
|
| + TestSetup test_setup;
|
| + CpuProfiler::Setup();
|
| + CpuProfiler::StartProfiling("1");
|
| + CpuProfiler::StopProfiling("2");
|
| + CpuProfiler::StartProfiling("1");
|
| + CpuProfiler::StopProfiling("");
|
| + CpuProfiler::TearDown();
|
| +}
|
| +
|
| #endif // ENABLE_LOGGING_AND_PROFILING
|
|
|