Chromium Code Reviews| Index: test/cctest/test-heap-profiler.cc |
| diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc |
| index f835a1e0d58149e1bf4c86dd8e274a3300222538..81b68a713fbacb712ea6c284f83d5459465de593 100644 |
| --- a/test/cctest/test-heap-profiler.cc |
| +++ b/test/cctest/test-heap-profiler.cc |
| @@ -895,6 +895,20 @@ TEST(DocumentURLWithException) { |
| } |
| +TEST(NoHandleLeaks) { |
|
Vitaly Repeshko
2011/11/17 18:08:20
Can you also check that if there's a garbage globa
|
| + v8::HandleScope scope; |
| + LocalContext env; |
| + |
| + CompileRun("document = { URL:\"abcdefgh\" };"); |
| + |
| + v8::Handle<v8::String> name(v8_str("leakz")); |
| + int count_before = i::HandleScope::NumberOfHandles(); |
| + v8::HeapProfiler::TakeSnapshot(name); |
| + int count_after = i::HandleScope::NumberOfHandles(); |
| + CHECK_EQ(count_before, count_after); |
| +} |
| + |
| + |
| TEST(NodesIteration) { |
| v8::HandleScope scope; |
| LocalContext env; |
| @@ -1024,6 +1038,7 @@ TEST(GetConstructorName) { |
| "Object", i::V8HeapExplorer::GetConstructorName(*js_obj6))); |
| } |
| + |
| TEST(FastCaseGetter) { |
| v8::HandleScope scope; |
| LocalContext env; |