diff options
Diffstat (limited to 'deps/v8/test/cctest/test-cpu-profiler.cc')
-rw-r--r-- | deps/v8/test/cctest/test-cpu-profiler.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/v8/test/cctest/test-cpu-profiler.cc b/deps/v8/test/cctest/test-cpu-profiler.cc index 0e6f09d2ef..239d8ae695 100644 --- a/deps/v8/test/cctest/test-cpu-profiler.cc +++ b/deps/v8/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 |