From: ulan@chromium.org Date: Wed, 14 May 2014 11:43:21 +0000 (+0000) Subject: Fix test after r21299. X-Git-Tag: upstream/4.7.83~9134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d92ce5752ab492d5b0f5c1f1d3e98f3eb413db2;p=platform%2Fupstream%2Fv8.git Fix test after r21299. This fixes Win and Mac test failures. TBR=danno@chromium.org Review URL: https://codereview.chromium.org/282863005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc index 757b36d..45ec1fc 100644 --- a/test/cctest/test-heap.cc +++ b/test/cctest/test-heap.cc @@ -3919,8 +3919,12 @@ TEST(NoWeakHashTableLeakWithIncrementalMarking) { } heap->CollectAllGarbage(i::Heap::kNoGCFlags); } - WeakHashTable* table = WeakHashTable::cast(heap->weak_object_to_code_table()); - CHECK_EQ(0, table->NumberOfElements()); + int elements = 0; + if (heap->weak_object_to_code_table()->IsHashTable()) { + WeakHashTable* t = WeakHashTable::cast(heap->weak_object_to_code_table()); + elements = t->NumberOfElements(); + } + CHECK_EQ(0, elements); }