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

Side by Side Diff: Source/platform/heap/MarkingVisitorImpl.h

Issue 1162403003: Oilpan: Remove checkMarkingAllowed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/MarkingVisitor.h ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef MarkingVisitorImpl_h 5 #ifndef MarkingVisitorImpl_h
6 #define MarkingVisitorImpl_h 6 #define MarkingVisitorImpl_h
7 7
8 #include "platform/heap/Heap.h" 8 #include "platform/heap/Heap.h"
9 #include "platform/heap/ThreadState.h" 9 #include "platform/heap/ThreadState.h"
10 #include "platform/heap/Visitor.h" 10 #include "platform/heap/Visitor.h"
(...skipping 21 matching lines...) Expand all
32 // the dangling pointer. 32 // the dangling pointer.
33 // Release builds don't have the ASSERT, but it is OK because 33 // Release builds don't have the ASSERT, but it is OK because
34 // release builds will crash in the following header->isMarked() 34 // release builds will crash in the following header->isMarked()
35 // because all the entries of the orphaned heaps are zapped. 35 // because all the entries of the orphaned heaps are zapped.
36 ASSERT(!pageFromObject(objectPointer)->orphaned()); 36 ASSERT(!pageFromObject(objectPointer)->orphaned());
37 37
38 if (header->isMarked()) 38 if (header->isMarked())
39 return; 39 return;
40 40
41 #if ENABLE(ASSERT) 41 #if ENABLE(ASSERT)
42 toDerived()->checkMarkingAllowed(); 42 ASSERT(ThreadState::current()->isInGC());
43 ASSERT(Heap::findPageFromAddress(header)); 43 ASSERT(Heap::findPageFromAddress(header));
44 #endif 44 #endif
45 header->mark(); 45 header->mark();
46 46
47 #if ENABLE(GC_PROFILING) 47 #if ENABLE(GC_PROFILING)
48 toDerived()->recordObjectGraphEdge(objectPointer); 48 toDerived()->recordObjectGraphEdge(objectPointer);
49 #endif 49 #endif
50 50
51 if (callback) 51 if (callback)
52 Heap::pushTraceCallback(const_cast<void*>(objectPointer), callback); 52 Heap::pushTraceCallback(const_cast<void*>(objectPointer), callback);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 private: 118 private:
119 static void markNoTracingCallback(Visitor* visitor, void* object) 119 static void markNoTracingCallback(Visitor* visitor, void* object)
120 { 120 {
121 visitor->markNoTracing(object); 121 visitor->markNoTracing(object);
122 } 122 }
123 }; 123 };
124 124
125 } // namespace blink 125 } // namespace blink
126 126
127 #endif 127 #endif
OLDNEW
« no previous file with comments | « Source/platform/heap/MarkingVisitor.h ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698