Fix TestInternalWeakLists test
authorvegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 18 Oct 2010 17:01:30 +0000 (17:01 +0000)
committervegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 18 Oct 2010 17:01:30 +0000 (17:01 +0000)
Releasing context handle is not enough to release context, it might be indirectly reachable through compilation cache.

TBR=sgjesse@chromium.org

Review URL: http://codereview.chromium.org/3750017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/cctest/test-heap.cc

index 2b1f61a..126ac21 100644 (file)
@@ -1029,6 +1029,9 @@ TEST(TestInternalWeakLists) {
     ctx[i]->Exit();
   }
 
+  // Force compilation cache cleanup.
+  Heap::CollectAllGarbage(true);
+
   // Dispose the global contexts one by one.
   for (int i = 0; i < kNumTestContexts; i++) {
     ctx[i].Dispose();