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

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

Issue 1609943003: Make platform/heap to use USING_FAST_MALLOC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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"
11 #include "wtf/Allocator.h"
11 #include "wtf/Functional.h" 12 #include "wtf/Functional.h"
12 #include "wtf/HashFunctions.h" 13 #include "wtf/HashFunctions.h"
13 #include "wtf/Locker.h" 14 #include "wtf/Locker.h"
14 #include "wtf/RawPtr.h" 15 #include "wtf/RawPtr.h"
15 #include "wtf/RefCounted.h" 16 #include "wtf/RefCounted.h"
16 #include "wtf/TypeTraits.h" 17 #include "wtf/TypeTraits.h"
17 18
18 namespace blink { 19 namespace blink {
19 20
20 template <typename Derived> 21 template <typename Derived>
21 class MarkingVisitorImpl { 22 class MarkingVisitorImpl {
23 USING_FAST_MALLOC(MarkingVisitorImpl);
22 protected: 24 protected:
23 inline void markHeader(HeapObjectHeader* header, const void* objectPointer, TraceCallback callback) 25 inline void markHeader(HeapObjectHeader* header, const void* objectPointer, TraceCallback callback)
24 { 26 {
25 ASSERT(header); 27 ASSERT(header);
26 ASSERT(objectPointer); 28 ASSERT(objectPointer);
27 if (!toDerived()->shouldMarkObject(objectPointer)) 29 if (!toDerived()->shouldMarkObject(objectPointer))
28 return; 30 return;
29 31
30 // If you hit this ASSERT, it means that there is a dangling pointer 32 // If you hit this ASSERT, it means that there is a dangling pointer
31 // from a live thread heap to a dead thread heap. We must eliminate 33 // from a live thread heap to a dead thread heap. We must eliminate
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 private: 128 private:
127 static void markNoTracingCallback(Visitor* visitor, void* object) 129 static void markNoTracingCallback(Visitor* visitor, void* object)
128 { 130 {
129 visitor->markNoTracing(object); 131 visitor->markNoTracing(object);
130 } 132 }
131 }; 133 };
132 134
133 } // namespace blink 135 } // namespace blink
134 136
135 #endif 137 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698