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

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

Issue 1909813002: Enable per thread heap for database thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 22 matching lines...) Expand all
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 arenas are zapped. 35 // because all the entries of the orphaned arenas 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 ASSERT(ThreadState::current()->isInGC()); 41 ASSERT(ThreadState::current()->isInGC());
42 ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing); 42 ASSERT(toDerived()->getMarkingMode() != Visitor::WeakProcessing);
43 DCHECK(&pageFromObject(objectPointer)->arena()->getThreadState()->heap() == &toDerived()->heap());
haraken 2016/05/24 16:15:28 Add a comment about what this DCHECK is checking.
keishi 2016/05/25 13:07:45 Done.
43 44
44 header->mark(); 45 header->mark();
45 46
46 if (callback) 47 if (callback)
47 toDerived()->heap().pushTraceCallback(const_cast<void*>(objectPointe r), callback); 48 toDerived()->heap().pushTraceCallback(const_cast<void*>(objectPointe r), callback);
48 } 49 }
49 50
50 inline void mark(const void* objectPointer, TraceCallback callback) 51 inline void mark(const void* objectPointer, TraceCallback callback)
51 { 52 {
52 if (!objectPointer) 53 if (!objectPointer)
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 private: 124 private:
124 static void markNoTracingCallback(Visitor* visitor, void* object) 125 static void markNoTracingCallback(Visitor* visitor, void* object)
125 { 126 {
126 visitor->markNoTracing(object); 127 visitor->markNoTracing(object);
127 } 128 }
128 }; 129 };
129 130
130 } // namespace blink 131 } // namespace blink
131 132
132 #endif 133 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698