| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 4330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4341 stack->pop(); | 4341 stack->pop(); |
| 4342 } | 4342 } |
| 4343 | 4343 |
| 4344 Persistent<HeapLinkedStack<TerminatedArrayItem>> pStack = stack; | 4344 Persistent<HeapLinkedStack<TerminatedArrayItem>> pStack = stack; |
| 4345 | 4345 |
| 4346 preciselyCollectGarbage(); | 4346 preciselyCollectGarbage(); |
| 4347 EXPECT_EQ(stackSize, static_cast<size_t>(IntWrapper::s_destructorCalls)); | 4347 EXPECT_EQ(stackSize, static_cast<size_t>(IntWrapper::s_destructorCalls)); |
| 4348 EXPECT_EQ(0u, pStack->size()); | 4348 EXPECT_EQ(0u, pStack->size()); |
| 4349 } | 4349 } |
| 4350 | 4350 |
| 4351 TEST(HeapTest, AllocationDuringFinalization) { | 4351 TEST(HeapTest, DISABLED_AllocationDuringFinalization) { |
| 4352 clearOutOldGarbage(); | 4352 clearOutOldGarbage(); |
| 4353 IntWrapper::s_destructorCalls = 0; | 4353 IntWrapper::s_destructorCalls = 0; |
| 4354 OneKiloByteObject::s_destructorCalls = 0; | 4354 OneKiloByteObject::s_destructorCalls = 0; |
| 4355 LargeHeapObject::s_destructorCalls = 0; | 4355 LargeHeapObject::s_destructorCalls = 0; |
| 4356 | 4356 |
| 4357 Persistent<IntWrapper> wrapper; | 4357 Persistent<IntWrapper> wrapper; |
| 4358 new FinalizationAllocator(&wrapper); | 4358 new FinalizationAllocator(&wrapper); |
| 4359 | 4359 |
| 4360 preciselyCollectGarbage(); | 4360 preciselyCollectGarbage(); |
| 4361 EXPECT_EQ(0, IntWrapper::s_destructorCalls); | 4361 EXPECT_EQ(0, IntWrapper::s_destructorCalls); |
| (...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6345 "HeapVector"); | 6345 "HeapVector"); |
| 6346 static_assert( | 6346 static_assert( |
| 6347 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, | 6347 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, |
| 6348 "HeapDeque"); | 6348 "HeapDeque"); |
| 6349 static_assert(WTF::IsGarbageCollectedType< | 6349 static_assert(WTF::IsGarbageCollectedType< |
| 6350 HeapTerminatedArray<Member<IntWrapper>>>::value, | 6350 HeapTerminatedArray<Member<IntWrapper>>>::value, |
| 6351 "HeapTerminatedArray"); | 6351 "HeapTerminatedArray"); |
| 6352 } | 6352 } |
| 6353 | 6353 |
| 6354 } // namespace blink | 6354 } // namespace blink |
| OLD | NEW |