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

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

Issue 875773002: Oilpan: disable stack depth assert with ASan enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « no previous file | 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 // 758 //
759 // If the trait allows it, invoke the trace callback right here on the 759 // If the trait allows it, invoke the trace callback right here on the
760 // not-yet-marked object. 760 // not-yet-marked object.
761 if (TraceEagerlyTrait<T>::value) { 761 if (TraceEagerlyTrait<T>::value) {
762 // Protect against too deep trace call chains, and the 762 // Protect against too deep trace call chains, and the
763 // unbounded system stack usage they can bring about. 763 // unbounded system stack usage they can bring about.
764 // 764 //
765 // Assert against deep stacks so as to flush them out, 765 // Assert against deep stacks so as to flush them out,
766 // but test and appropriately handle them should they occur 766 // but test and appropriately handle them should they occur
767 // in release builds. 767 // in release builds.
768 //
769 // ASan adds extra stack usage, so disable the assert when it is
770 // enabled so as to avoid testing against a much lower & too low,
771 // stack depth threshold.
772 //
768 // FIXME: visitor->isMarked(t) exception is to allow empty trace() 773 // FIXME: visitor->isMarked(t) exception is to allow empty trace()
769 // calls from HashTable weak processing. Remove the condition once 774 // calls from HashTable weak processing. Remove the condition once
770 // it is refactored. 775 // it is refactored.
776 #if !defined(ADDRESS_SANITIZER)
771 ASSERT(visitor->canTraceEagerly() || visitor->isMarked(t)); 777 ASSERT(visitor->canTraceEagerly() || visitor->isMarked(t));
778 #endif
772 if (LIKELY(visitor->canTraceEagerly())) { 779 if (LIKELY(visitor->canTraceEagerly())) {
773 if (visitor->ensureMarked(t)) { 780 if (visitor->ensureMarked(t)) {
774 TraceTrait<T>::trace(visitor, const_cast<T*>(t)); 781 TraceTrait<T>::trace(visitor, const_cast<T*>(t));
775 } 782 }
776 return; 783 return;
777 } 784 }
778 } 785 }
779 visitor->mark(const_cast<T*>(t), &TraceTrait<T>::trace); 786 visitor->mark(const_cast<T*>(t), &TraceTrait<T>::trace);
780 } 787 }
781 788
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 struct GCInfoTrait { 991 struct GCInfoTrait {
985 static size_t index() 992 static size_t index()
986 { 993 {
987 return GCInfoAtBase<typename GetGarbageCollectedBase<T>::type>::index(); 994 return GCInfoAtBase<typename GetGarbageCollectedBase<T>::type>::index();
988 } 995 }
989 }; 996 };
990 997
991 } 998 }
992 999
993 #endif 1000 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698