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

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

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: m_domTreeVersion initialization 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 TraceTraits_h 5 #ifndef TraceTraits_h
6 #define TraceTraits_h 6 #define TraceTraits_h
7 7
8 #include "platform/heap/GCInfo.h" 8 #include "platform/heap/GCInfo.h"
9 #include "platform/heap/Heap.h" 9 #include "platform/heap/Heap.h"
10 #include "platform/heap/InlinedGlobalMarkingVisitor.h" 10 #include "platform/heap/InlinedGlobalMarkingVisitor.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 template <typename T, bool = NeedsAdjustAndMark<T>::value> 42 template <typename T, bool = NeedsAdjustAndMark<T>::value>
43 class AdjustAndMarkTrait; 43 class AdjustAndMarkTrait;
44 44
45 template <typename T> 45 template <typename T>
46 class AdjustAndMarkTrait<T, false> { 46 class AdjustAndMarkTrait<T, false> {
47 STATIC_ONLY(AdjustAndMarkTrait); 47 STATIC_ONLY(AdjustAndMarkTrait);
48 48
49 public: 49 public:
50 template <typename VisitorDispatcher> 50 template <typename VisitorDispatcher>
51 static void mark(VisitorDispatcher visitor, const T* t) { 51 static void mark(VisitorDispatcher visitor, const T* t) {
52 #if ENABLE(ASSERT) 52 #if DCHECK_IS_ON()
53 assertObjectHasGCInfo(const_cast<T*>(t), GCInfoTrait<T>::index()); 53 assertObjectHasGCInfo(const_cast<T*>(t), GCInfoTrait<T>::index());
54 #endif 54 #endif
55 // Default mark method of the trait just calls the two-argument mark 55 // Default mark method of the trait just calls the two-argument mark
56 // method on the visitor. The second argument is the static trace method 56 // method on the visitor. The second argument is the static trace method
57 // of the trait, which by default calls the instance method 57 // of the trait, which by default calls the instance method
58 // trace(Visitor*) on the object. 58 // trace(Visitor*) on the object.
59 // 59 //
60 // If the trait allows it, invoke the trace callback right here on the 60 // If the trait allows it, invoke the trace callback right here on the
61 // not-yet-marked object. 61 // not-yet-marked object.
62 if (TraceEagerlyTrait<T>::value) { 62 if (TraceEagerlyTrait<T>::value) {
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 // since iterating over the hash table backing will find the whole 791 // since iterating over the hash table backing will find the whole
792 // chain. 792 // chain.
793 visitor->markNoTracing(node); 793 visitor->markNoTracing(node);
794 return false; 794 return false;
795 } 795 }
796 }; 796 };
797 797
798 } // namespace WTF 798 } // namespace WTF
799 799
800 #endif 800 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/ThreadState.cpp ('k') | third_party/WebKit/Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698