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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 void setNextFireTime(double now, double delay); | 89 void setNextFireTime(double now, double delay); |
90 | 90 |
91 void runInternal(); | 91 void runInternal(); |
92 | 92 |
93 class CancellableTimerTask final : public WebTaskRunner::Task { | 93 class CancellableTimerTask final : public WebTaskRunner::Task { |
94 WTF_MAKE_NONCOPYABLE(CancellableTimerTask); | 94 WTF_MAKE_NONCOPYABLE(CancellableTimerTask); |
95 public: | 95 public: |
96 explicit CancellableTimerTask(TimerBase* timer) : m_timer(timer) { } | 96 explicit CancellableTimerTask(TimerBase* timer) : m_timer(timer) { } |
97 | 97 |
| 98 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
98 ~CancellableTimerTask() override | 99 ~CancellableTimerTask() override |
99 { | 100 { |
100 if (m_timer) | 101 if (m_timer) |
101 m_timer->m_cancellableTimerTask = nullptr; | 102 m_timer->m_cancellableTimerTask = nullptr; |
102 } | 103 } |
103 | 104 |
104 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 105 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
105 void run() override | 106 void run() override |
106 { | 107 { |
107 if (m_timer) { | 108 if (m_timer) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 210 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
210 inline bool TimerBase::isActive() const | 211 inline bool TimerBase::isActive() const |
211 { | 212 { |
212 ASSERT(m_thread == currentThread()); | 213 ASSERT(m_thread == currentThread()); |
213 return m_cancellableTimerTask; | 214 return m_cancellableTimerTask; |
214 } | 215 } |
215 | 216 |
216 } // namespace blink | 217 } // namespace blink |
217 | 218 |
218 #endif // Timer_h | 219 #endif // Timer_h |
OLD | NEW |