Chromium Code Reviews| Index: src/heap/heap.cc |
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
| index e9379ac5658c9653cb21023f180d567a2364c068..255bab9deeb36d23d364592cd4bdfcb18fcde579 100644 |
| --- a/src/heap/heap.cc |
| +++ b/src/heap/heap.cc |
| @@ -141,7 +141,8 @@ Heap::Heap() |
| chunks_queued_for_free_(NULL), |
| gc_callbacks_depth_(0), |
| deserialization_complete_(false), |
| - concurrent_sweeping_enabled_(false) { |
| + concurrent_sweeping_enabled_(false), |
| + strong_roots_list_(NULL) { |
| // Allow build-time customization of the max semispace size. Building |
| // V8 with snapshots and a non-default max semispace size is much |
| // easier if you can define it as part of the build environment. |
| @@ -4999,6 +5000,9 @@ void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) { |
| // output a flag to the snapshot. However at this point the serializer and |
| // deserializer are deliberately a little unsynchronized (see above) so the |
| // checking of the sync flag in the snapshot would fail. |
| + for (StrongRootsList* list = strong_roots_list_; list; list = list->next_) { |
|
Erik Corry
2015/04/27 15:39:13
It looks like this stuff should be before the seri
titzer
2015/05/06 09:40:36
Done.
|
| + v->VisitPointers(list->start_, list->end_); |
| + } |
| } |
| @@ -5489,6 +5493,13 @@ void Heap::TearDown() { |
| store_buffer()->TearDown(); |
| isolate_->memory_allocator()->TearDown(); |
| + |
| + StrongRootsList* next = NULL; |
| + for (StrongRootsList* list = strong_roots_list_; list; list = next) { |
| + next = list->next_; |
| + delete list; |
| + } |
| + strong_roots_list_ = NULL; |
| } |