| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 NO_LAZY_SWEEP_SANITIZE_ADDRESS | 241 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
| 242 inline void TimerBase::checkHeapIndex() const | 242 inline void TimerBase::checkHeapIndex() const |
| 243 { | 243 { |
| 244 ASSERT(timerHeap() == threadGlobalTimerHeap()); | 244 ASSERT(timerHeap() == threadGlobalTimerHeap()); |
| 245 ASSERT(!timerHeap().isEmpty()); | 245 ASSERT(!timerHeap().isEmpty()); |
| 246 ASSERT(m_heapIndex >= 0); | 246 ASSERT(m_heapIndex >= 0); |
| 247 ASSERT(m_heapIndex < static_cast<int>(timerHeap().size())); | 247 ASSERT(m_heapIndex < static_cast<int>(timerHeap().size())); |
| 248 ASSERT(timerHeap()[m_heapIndex] == this); | 248 ASSERT(timerHeap()[m_heapIndex] == this); |
| 249 } | 249 } |
| 250 | 250 |
| 251 NO_LAZY_SWEEP_SANITIZE_ADDRESS |
| 251 inline void TimerBase::checkConsistency() const | 252 inline void TimerBase::checkConsistency() const |
| 252 { | 253 { |
| 253 // Timers should be in the heap if and only if they have a non-zero next fir
e time. | 254 // Timers should be in the heap if and only if they have a non-zero next fir
e time. |
| 254 ASSERT(inHeap() == (m_nextFireTime != 0)); | 255 ASSERT(inHeap() == (m_nextFireTime != 0)); |
| 255 if (inHeap()) | 256 if (inHeap()) |
| 256 checkHeapIndex(); | 257 checkHeapIndex(); |
| 257 } | 258 } |
| 258 | 259 |
| 259 void TimerBase::heapDecreaseKey() | 260 void TimerBase::heapDecreaseKey() |
| 260 { | 261 { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 setNextFireTime(m_unalignedNextFireTime); | 412 setNextFireTime(m_unalignedNextFireTime); |
| 412 } | 413 } |
| 413 | 414 |
| 414 double TimerBase::nextUnalignedFireInterval() const | 415 double TimerBase::nextUnalignedFireInterval() const |
| 415 { | 416 { |
| 416 ASSERT(isActive()); | 417 ASSERT(isActive()); |
| 417 return std::max(m_unalignedNextFireTime - monotonicallyIncreasingTime(), 0.0
); | 418 return std::max(m_unalignedNextFireTime - monotonicallyIncreasingTime(), 0.0
); |
| 418 } | 419 } |
| 419 | 420 |
| 420 } // namespace blink | 421 } // namespace blink |
| OLD | NEW |