| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/heap/PersistentNode.h" | 5 #include "platform/heap/PersistentNode.h" |
| 6 | 6 |
| 7 #include "base/debug/alias.h" | 7 #include "base/debug/alias.h" |
| 8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 class DummyGCBase final : public GarbageCollected<DummyGCBase> { | 14 class DummyGCBase final : public GarbageCollected<DummyGCBase> { |
| 15 public: | 15 public: |
| 16 DEFINE_INLINE_TRACE() {} | 16 DEFINE_INLINE_TRACE() {} |
| 17 }; | 17 }; |
| 18 } | 18 } // namespace |
| 19 | 19 |
| 20 PersistentRegion::~PersistentRegion() { | 20 PersistentRegion::~PersistentRegion() { |
| 21 PersistentNodeSlots* slots = slots_; | 21 PersistentNodeSlots* slots = slots_; |
| 22 while (slots) { | 22 while (slots) { |
| 23 PersistentNodeSlots* dead_slots = slots; | 23 PersistentNodeSlots* dead_slots = slots; |
| 24 slots = slots->next_; | 24 slots = slots->next_; |
| 25 delete dead_slots; | 25 delete dead_slots; |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 #if DCHECK_IS_ON() | 192 #if DCHECK_IS_ON() |
| 193 DCHECK_EQ(persistent_count, persistent_region_->persistent_count_); | 193 DCHECK_EQ(persistent_count, persistent_region_->persistent_count_); |
| 194 #endif | 194 #endif |
| 195 } | 195 } |
| 196 #endif | 196 #endif |
| 197 | 197 |
| 198 } // namespace blink | 198 } // namespace blink |
| OLD | NEW |