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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 InlinedGlobalMarkingVisitor_h 5 #ifndef InlinedGlobalMarkingVisitor_h
6 #define InlinedGlobalMarkingVisitor_h 6 #define InlinedGlobalMarkingVisitor_h
7 7
8 #include "platform/heap/MarkingVisitorImpl.h" 8 #include "platform/heap/MarkingVisitorImpl.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 30 matching lines...) Expand all
41 { 41 {
42 Helper::mark(t); 42 Helper::mark(t);
43 } 43 }
44 44
45 template<typename T, void (T::*method)(Visitor*)> 45 template<typename T, void (T::*method)(Visitor*)>
46 void registerWeakMembers(const T* obj) 46 void registerWeakMembers(const T* obj)
47 { 47 {
48 Helper::template registerWeakMembers<T, method>(obj); 48 Helper::template registerWeakMembers<T, method>(obj);
49 } 49 }
50 50
51 Visitor* getUninlined() { return m_visitor; } 51 ThreadHeap& heap() { return m_visitor->heap(); }
52
52 protected: 53 protected:
53 // Methods to be called from MarkingVisitorImpl. 54 // Methods to be called from MarkingVisitorImpl.
54 55
55 inline bool shouldMarkObject(const void*) 56 inline bool shouldMarkObject(const void*)
56 { 57 {
57 // As this is global marking visitor, we need to mark all objects. 58 // As this is global marking visitor, we need to mark all objects.
58 return true; 59 return true;
59 } 60 }
60 61
61 inline Visitor::MarkingMode getMarkingMode() const 62 inline Visitor::MarkingMode getMarkingMode() const
(...skipping 10 matching lines...) Expand all
72 Visitor* m_visitor; 73 Visitor* m_visitor;
73 }; 74 };
74 75
75 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) 76 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor)
76 { 77 {
77 } 78 }
78 79
79 } // namespace blink 80 } // namespace blink
80 81
81 #endif 82 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/platform/heap/MarkingVisitorImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698