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

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

Issue 2617393004: Remove marking visitors' shouldMarkObject(). (Closed)
Patch Set: reinstate same-thread dcheck for ensureMarked() Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/MarkingVisitor.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 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 Helper::template registerWeakMembers<T, method>(obj); 47 Helper::template registerWeakMembers<T, method>(obj);
48 } 48 }
49 49
50 protected: 50 protected:
51 // Methods to be called from MarkingVisitorImpl. 51 // Methods to be called from MarkingVisitorImpl.
52 52
53 inline bool shouldMarkObject(const void*) const {
54 // As this is global marking visitor, we need to mark all objects.
55 return true;
56 }
57
58 inline Visitor::MarkingMode getMarkingMode() const { return m_markingMode; } 53 inline Visitor::MarkingMode getMarkingMode() const { return m_markingMode; }
59 54
60 private: 55 private:
61 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) { 56 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) {
62 return *static_cast<InlinedGlobalMarkingVisitor*>(helper); 57 return *static_cast<InlinedGlobalMarkingVisitor*>(helper);
63 } 58 }
64 59
65 // TODO(sof): attempt to unify this field with Visitor::m_markingMode. 60 // TODO(sof): attempt to unify this field with Visitor::m_markingMode.
66 const Visitor::MarkingMode m_markingMode; 61 const Visitor::MarkingMode m_markingMode;
67 }; 62 };
68 63
69 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) {} 64 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) {}
70 65
71 } // namespace blink 66 } // namespace blink
72 67
73 #endif 68 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/MarkingVisitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698