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

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

Issue 1125613002: Oilpan: handle thread-local weak tracing slightly better. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename some methods Created 5 years, 7 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/StackFrameDepth.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/Visitor.h" 10 #include "platform/heap/Visitor.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // unbounded system stack usage they can bring about. 49 // unbounded system stack usage they can bring about.
50 // 50 //
51 // Assert against deep stacks so as to flush them out, 51 // Assert against deep stacks so as to flush them out,
52 // but test and appropriately handle them should they occur 52 // but test and appropriately handle them should they occur
53 // in release builds. 53 // in release builds.
54 // 54 //
55 // ASan adds extra stack usage, so disable the assert when it is 55 // ASan adds extra stack usage, so disable the assert when it is
56 // enabled so as to avoid testing against a much lower & too low, 56 // enabled so as to avoid testing against a much lower & too low,
57 // stack depth threshold. 57 // stack depth threshold.
58 #if !defined(ADDRESS_SANITIZER) 58 #if !defined(ADDRESS_SANITIZER)
59 ASSERT(StackFrameDepth::isSafeToRecurse()); 59 ASSERT(!StackFrameDepth::isEnabled() || StackFrameDepth::isSafeToRec urse());
60 #endif 60 #endif
61 if (LIKELY(StackFrameDepth::isSafeToRecurse())) { 61 if (LIKELY(StackFrameDepth::isSafeToRecurse())) {
62 if (visitor->ensureMarked(t)) { 62 if (visitor->ensureMarked(t)) {
63 TraceTrait<T>::trace(visitor, const_cast<T*>(t)); 63 TraceTrait<T>::trace(visitor, const_cast<T*>(t));
64 } 64 }
65 return; 65 return;
66 } 66 }
67 } 67 }
68 visitor->mark(const_cast<T*>(t), &TraceTrait<T>::trace); 68 visitor->mark(const_cast<T*>(t), &TraceTrait<T>::trace);
69 } 69 }
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // since iterating over the hash table backing will find the whole 549 // since iterating over the hash table backing will find the whole
550 // chain. 550 // chain.
551 visitor->markNoTracing(node); 551 visitor->markNoTracing(node);
552 return false; 552 return false;
553 } 553 }
554 }; 554 };
555 555
556 } // namespace WTF 556 } // namespace WTF
557 557
558 #endif 558 #endif
OLDNEW
« no previous file with comments | « Source/platform/heap/StackFrameDepth.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698