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

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

Issue 824513004: ASSERT that Visitor::mark is only called when inGC() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: haraken Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.cpp ('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 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 m_visitor->recordObjectGraphEdge(objectPointer); 73 m_visitor->recordObjectGraphEdge(objectPointer);
74 } 74 }
75 #endif 75 #endif
76 76
77 private: 77 private:
78 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) 78 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper)
79 { 79 {
80 return *static_cast<InlinedGlobalMarkingVisitor*>(helper); 80 return *static_cast<InlinedGlobalMarkingVisitor*>(helper);
81 } 81 }
82 82
83 #if ENABLE(ASSERT)
84 inline void checkMarkingAllowed() { getUninlined()->checkMarkingAllowed(); }
haraken 2015/01/14 02:50:42 getUninlined() => m_visitor.
kouhei (in TOK) 2015/01/14 03:00:56 Done.
85 inline void setAllowMarkingForHashTableWeakProcessing(bool allow)
86 {
87 getUninlined()->setAllowMarkingForHashTableWeakProcessing(allow);
haraken 2015/01/14 02:50:42 getUninlined() => m_visitor.
kouhei (in TOK) 2015/01/14 03:00:56 Done.
88 }
89 #endif
90
83 Visitor* m_visitor; 91 Visitor* m_visitor;
84 }; 92 };
85 93
86 // If T does not support trace(InlinedGlobalMarkingVisitor). 94 // If T does not support trace(InlinedGlobalMarkingVisitor).
87 template <typename T> 95 template <typename T>
88 struct TraceCompatibilityAdaptor<T, false> { 96 struct TraceCompatibilityAdaptor<T, false> {
89 inline static void trace(blink::Visitor* visitor, T* self) 97 inline static void trace(blink::Visitor* visitor, T* self)
90 { 98 {
91 self->trace(visitor); 99 self->trace(visitor);
92 } 100 }
(...skipping 20 matching lines...) Expand all
113 121
114 inline static void trace(InlinedGlobalMarkingVisitor visitor, T* self) 122 inline static void trace(InlinedGlobalMarkingVisitor visitor, T* self)
115 { 123 {
116 self->trace(visitor); 124 self->trace(visitor);
117 } 125 }
118 }; 126 };
119 127
120 } // namespace blink 128 } // namespace blink
121 129
122 #endif 130 #endif
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698