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

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

Issue 1144933004: Revert of Various ASan exemptions to allow Oilpan pre-sweep poisoning of unmarkeds. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/platform/heap/AddressSanitizer.h ('k') | Source/platform/heap/ThreadState.cpp » ('j') | 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 template<typename T> class HeapTerminatedArray; 49 template<typename T> class HeapTerminatedArray;
50 50
51 class PersistentNode { 51 class PersistentNode {
52 public: 52 public:
53 explicit PersistentNode(TraceCallback trace) 53 explicit PersistentNode(TraceCallback trace)
54 : m_trace(trace) 54 : m_trace(trace)
55 { 55 {
56 } 56 }
57 57
58 NO_LAZY_SWEEP_SANITIZE_ADDRESS
59 bool isHeapObjectAlive() { return m_trace; } 58 bool isHeapObjectAlive() { return m_trace; }
60 59
61 virtual ~PersistentNode() 60 virtual ~PersistentNode()
62 { 61 {
63 ASSERT(isHeapObjectAlive()); 62 ASSERT(isHeapObjectAlive());
64 m_trace = nullptr; 63 m_trace = nullptr;
65 } 64 }
66 65
67 // Ideally the trace method should be virtual and automatically dispatch 66 // Ideally the trace method should be virtual and automatically dispatch
68 // to the most specific implementation. However having a virtual method 67 // to the most specific implementation. However having a virtual method
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 MutexLocker m_locker; 119 MutexLocker m_locker;
121 }; 120 };
122 }; 121 };
123 122
124 // Base class for persistent handles. RootsAccessor specifies which list to 123 // Base class for persistent handles. RootsAccessor specifies which list to
125 // link resulting handle into. Owner specifies the class containing trace 124 // link resulting handle into. Owner specifies the class containing trace
126 // method. 125 // method.
127 template<typename RootsAccessor, typename Owner> 126 template<typename RootsAccessor, typename Owner>
128 class PersistentBase : public PersistentNode { 127 class PersistentBase : public PersistentNode {
129 public: 128 public:
130 NO_LAZY_SWEEP_SANITIZE_ADDRESS
131 ~PersistentBase() 129 ~PersistentBase()
132 { 130 {
133 typename RootsAccessor::Lock lock; 131 typename RootsAccessor::Lock lock;
134 ASSERT(m_roots == RootsAccessor::roots()); // Check that the thread is u sing the same roots list. 132 ASSERT(m_roots == RootsAccessor::roots()); // Check that the thread is u sing the same roots list.
135 ASSERT(isHeapObjectAlive()); 133 ASSERT(isHeapObjectAlive());
136 ASSERT(m_next->isHeapObjectAlive()); 134 ASSERT(m_next->isHeapObjectAlive());
137 ASSERT(m_prev->isHeapObjectAlive()); 135 ASSERT(m_prev->isHeapObjectAlive());
138 m_next->m_prev = m_prev; 136 m_next->m_prev = m_prev;
139 m_prev->m_next = m_next; 137 m_prev->m_next = m_next;
140 } 138 }
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin k::IsGarbageCollectedType<T>::value> { 1067 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin k::IsGarbageCollectedType<T>::value> {
1070 static_assert(sizeof(T), "T must be fully defined"); 1068 static_assert(sizeof(T), "T must be fully defined");
1071 }; 1069 };
1072 1070
1073 template<typename T> 1071 template<typename T>
1074 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; 1072 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete;
1075 1073
1076 } // namespace WTF 1074 } // namespace WTF
1077 1075
1078 #endif 1076 #endif
OLDNEW
« no previous file with comments | « Source/platform/heap/AddressSanitizer.h ('k') | Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698