OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 class TimerIsObjectAliveTrait { | 143 class TimerIsObjectAliveTrait { |
144 public: | 144 public: |
145 static bool isHeapObjectAlive(T*) { return true; } | 145 static bool isHeapObjectAlive(T*) { return true; } |
146 }; | 146 }; |
147 | 147 |
148 template<typename T> | 148 template<typename T> |
149 class TimerIsObjectAliveTrait<T, true> { | 149 class TimerIsObjectAliveTrait<T, true> { |
150 public: | 150 public: |
151 static bool isHeapObjectAlive(T* objectPointer) | 151 static bool isHeapObjectAlive(T* objectPointer) |
152 { | 152 { |
153 return !Heap::willObjectBeLazilySwept(objectPointer); | 153 return !ThreadHeap::willObjectBeLazilySwept(objectPointer); |
154 } | 154 } |
155 }; | 155 }; |
156 | 156 |
157 template <typename TimerFiredClass> | 157 template <typename TimerFiredClass> |
158 class Timer : public TimerBase { | 158 class Timer : public TimerBase { |
159 public: | 159 public: |
160 using TimerFiredFunction = void (TimerFiredClass::*)(Timer<TimerFiredClass>*
); | 160 using TimerFiredFunction = void (TimerFiredClass::*)(Timer<TimerFiredClass>*
); |
161 | 161 |
162 Timer(TimerFiredClass* o, TimerFiredFunction f) | 162 Timer(TimerFiredClass* o, TimerFiredFunction f) |
163 : m_object(o), m_function(f) | 163 : m_object(o), m_function(f) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 213 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
214 inline bool TimerBase::isActive() const | 214 inline bool TimerBase::isActive() const |
215 { | 215 { |
216 ASSERT(m_thread == currentThread()); | 216 ASSERT(m_thread == currentThread()); |
217 return m_cancellableTimerTask; | 217 return m_cancellableTimerTask; |
218 } | 218 } |
219 | 219 |
220 } // namespace blink | 220 } // namespace blink |
221 | 221 |
222 #endif // Timer_h | 222 #endif // Timer_h |
OLD | NEW |