| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 void DOMTimer::contextDestroyed() { | 121 void DOMTimer::contextDestroyed() { |
| 122 stop(); | 122 stop(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void DOMTimer::fired() { | 125 void DOMTimer::fired() { |
| 126 ExecutionContext* context = getExecutionContext(); | 126 ExecutionContext* context = getExecutionContext(); |
| 127 ASSERT(context); | 127 ASSERT(context); |
| 128 context->timers()->setTimerNestingLevel(m_nestingLevel); | 128 context->timers()->setTimerNestingLevel(m_nestingLevel); |
| 129 ASSERT(!context->activeDOMObjectsAreSuspended()); | 129 ASSERT(!context->activeDOMObjectsAreSuspended()); |
| 130 // Only the first execution of a multi-shot timer should get an affirmative us
er gesture indicator. | 130 // Only the first execution of a multi-shot timer should get an affirmative |
| 131 // user gesture indicator. |
| 131 UserGestureIndicator gestureIndicator(m_userGestureToken.release()); | 132 UserGestureIndicator gestureIndicator(m_userGestureToken.release()); |
| 132 | 133 |
| 133 TRACE_EVENT1("devtools.timeline", "TimerFire", "data", | 134 TRACE_EVENT1("devtools.timeline", "TimerFire", "data", |
| 134 InspectorTimerFireEvent::data(context, m_timeoutID)); | 135 InspectorTimerFireEvent::data(context, m_timeoutID)); |
| 135 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( | 136 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( |
| 136 context, "timerFired", false); | 137 context, "timerFired", false); |
| 137 InspectorInstrumentation::AsyncTask asyncTask(context, this); | 138 InspectorInstrumentation::AsyncTask asyncTask(context, this); |
| 138 | 139 |
| 139 // Simple case for non-one-shot timers. | 140 // Simple case for non-one-shot timers. |
| 140 if (isActive()) { | 141 if (isActive()) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 WebTaskRunner* DOMTimer::timerTaskRunner() const { | 174 WebTaskRunner* DOMTimer::timerTaskRunner() const { |
| 174 return getExecutionContext()->timers()->timerTaskRunner(); | 175 return getExecutionContext()->timers()->timerTaskRunner(); |
| 175 } | 176 } |
| 176 | 177 |
| 177 DEFINE_TRACE(DOMTimer) { | 178 DEFINE_TRACE(DOMTimer) { |
| 178 visitor->trace(m_action); | 179 visitor->trace(m_action); |
| 179 SuspendableTimer::trace(visitor); | 180 SuspendableTimer::trace(visitor); |
| 180 } | 181 } |
| 181 | 182 |
| 182 } // namespace blink | 183 } // namespace blink |
| OLD | NEW |