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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 void runInternal(); | 84 void runInternal(); |
85 | 85 |
86 class CancellableTimerTask final : public WebThread::Task { | 86 class CancellableTimerTask final : public WebThread::Task { |
87 WTF_MAKE_NONCOPYABLE(CancellableTimerTask); | 87 WTF_MAKE_NONCOPYABLE(CancellableTimerTask); |
88 public: | 88 public: |
89 explicit CancellableTimerTask(TimerBase* timer) : m_timer(timer) { } | 89 explicit CancellableTimerTask(TimerBase* timer) : m_timer(timer) { } |
90 | 90 |
91 ~CancellableTimerTask() override { } | 91 ~CancellableTimerTask() override { } |
92 | 92 |
| 93 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
93 void run() override | 94 void run() override |
94 { | 95 { |
95 if (m_timer) { | 96 if (m_timer) { |
96 m_timer->m_cancellableTimerTask = nullptr; | 97 m_timer->m_cancellableTimerTask = nullptr; |
97 m_timer->runInternal(); | 98 m_timer->runInternal(); |
98 } | 99 } |
99 } | 100 } |
100 | 101 |
101 void cancel() | 102 void cancel() |
102 { | 103 { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 176 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
176 inline bool TimerBase::isActive() const | 177 inline bool TimerBase::isActive() const |
177 { | 178 { |
178 ASSERT(m_thread == currentThread()); | 179 ASSERT(m_thread == currentThread()); |
179 return m_cancellableTimerTask; | 180 return m_cancellableTimerTask; |
180 } | 181 } |
181 | 182 |
182 } // namespace blink | 183 } // namespace blink |
183 | 184 |
184 #endif // Timer_h | 185 #endif // Timer_h |
OLD | NEW |