| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 if (m_pendingSharedTimerFireTime <= currentMonotonicTime && nextFire
Time <= currentMonotonicTime) | 95 if (m_pendingSharedTimerFireTime <= currentMonotonicTime && nextFire
Time <= currentMonotonicTime) |
| 96 return; | 96 return; |
| 97 } | 97 } |
| 98 m_pendingSharedTimerFireTime = nextFireTime; | 98 m_pendingSharedTimerFireTime = nextFireTime; |
| 99 m_sharedTimer->setFireInterval(max(nextFireTime - currentMonotonicTime,
0.0)); | 99 m_sharedTimer->setFireInterval(max(nextFireTime - currentMonotonicTime,
0.0)); |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 void ThreadTimers::sharedTimerFired() | 103 void ThreadTimers::sharedTimerFired() |
| 104 { | 104 { |
| 105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "Internal"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "BlinkInternal"); |
| 106 | 106 |
| 107 // Redirect to non-static method. | 107 // Redirect to non-static method. |
| 108 PlatformThreadData::current().threadTimers().sharedTimerFiredInternal(); | 108 PlatformThreadData::current().threadTimers().sharedTimerFiredInternal(); |
| 109 | 109 |
| 110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "Sleeping"); | 110 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "Sleeping"); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void ThreadTimers::sharedTimerFiredInternal() | 113 void ThreadTimers::sharedTimerFiredInternal() |
| 114 { | 114 { |
| 115 // Do a re-entrancy check. | 115 // Do a re-entrancy check. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 145 | 145 |
| 146 void ThreadTimers::fireTimersInNestedEventLoop() | 146 void ThreadTimers::fireTimersInNestedEventLoop() |
| 147 { | 147 { |
| 148 // Reset the reentrancy guard so the timers can fire again. | 148 // Reset the reentrancy guard so the timers can fire again. |
| 149 m_firingTimers = false; | 149 m_firingTimers = false; |
| 150 updateSharedTimer(); | 150 updateSharedTimer(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace WebCore | 153 } // namespace WebCore |
| 154 | 154 |
| OLD | NEW |