| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 51e4ba1cd5ab84f2fe21d7a424eace49d6ab2f1c..fd788cdbe991c413d00e7ee2ce74ca9b4a7a2371 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -539,6 +539,9 @@
|
| static const int kAbortIncrementalMarkingMask = 2;
|
| static const int kFinalizeIncrementalMarkingMask = 4;
|
|
|
| + // Making the heap iterable requires us to abort incremental marking.
|
| + static const int kMakeHeapIterableMask = kAbortIncrementalMarkingMask;
|
| +
|
| // The roots that have an index less than this are always in old space.
|
| static const int kOldSpaceRoots = 0x20;
|
|
|
| @@ -658,6 +661,9 @@
|
|
|
| // Converts the given boolean condition to JavaScript boolean value.
|
| inline Oddball* ToBoolean(bool condition);
|
| +
|
| + // Check whether the heap is currently iterable.
|
| + bool IsHeapIterable();
|
|
|
| // Notify the heap that a context has been disposed.
|
| int NotifyContextDisposed(bool dependant_context);
|
| @@ -1024,7 +1030,9 @@
|
| AllocationSpace space, const char* gc_reason = NULL,
|
| const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
|
|
|
| - // Performs a full garbage collection.
|
| + // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is
|
| + // non-zero, then the slower precise sweeper is used, which leaves the heap
|
| + // in a state where we can iterate over the heap visiting all objects.
|
| void CollectAllGarbage(
|
| int flags = kFinalizeIncrementalMarkingMask, const char* gc_reason = NULL,
|
| const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
|
| @@ -1526,7 +1534,7 @@
|
| void EnsureFillerObjectAtTop();
|
|
|
| // Ensure that we have swept all spaces in such a way that we can iterate
|
| - // over all objects.
|
| + // over all objects. May cause a GC.
|
| void MakeHeapIterable();
|
|
|
| // Performs garbage collection operation.
|
|
|