Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1362)

Unified Diff: src/heap/heap.h

Issue 1319953003: [heap] Get rid of dead code in HeapIterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 8ebf21b841c71c649726d4ef144b336a38d22ed6..b86b5c46b4efa8ba799b6d5f41f7e1d94771348b 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -2579,26 +2579,26 @@ class HeapIterator BASE_EMBEDDED {
public:
enum HeapObjectsFiltering { kNoFiltering, kFilterUnreachable };
- explicit HeapIterator(Heap* heap);
- HeapIterator(Heap* heap, HeapObjectsFiltering filtering);
+ explicit HeapIterator(Heap* heap,
+ HeapObjectsFiltering filtering = kNoFiltering);
~HeapIterator();
HeapObject* next();
- void reset();
private:
struct MakeHeapIterableHelper {
explicit MakeHeapIterableHelper(Heap* heap) { heap->MakeHeapIterable(); }
};
- // Perform the initialization.
- void Init();
- // Perform all necessary shutdown (destruction) work.
- void Shutdown();
HeapObject* NextObject();
+ // The following two fields need to be declared in this order. Initialization
+ // order guarantees that we first make the heap iterable (which may involve
+ // allocations) and only then lock it down by not allowing further
+ // allocations.
MakeHeapIterableHelper make_heap_iterable_helper_;
DisallowHeapAllocation no_heap_allocation_;
+
Heap* heap_;
HeapObjectsFiltering filtering_;
HeapObjectsFilter* filter_;
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698