| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 stop(); | 131 stop(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 void DOMTimer::fired() { | 134 void DOMTimer::fired() { |
| 135 ExecutionContext* context = getExecutionContext(); | 135 ExecutionContext* context = getExecutionContext(); |
| 136 ASSERT(context); | 136 ASSERT(context); |
| 137 context->timers()->setTimerNestingLevel(m_nestingLevel); | 137 context->timers()->setTimerNestingLevel(m_nestingLevel); |
| 138 DCHECK(!context->isContextSuspended()); | 138 DCHECK(!context->isContextSuspended()); |
| 139 // Only the first execution of a multi-shot timer should get an affirmative | 139 // Only the first execution of a multi-shot timer should get an affirmative |
| 140 // user gesture indicator. | 140 // user gesture indicator. |
| 141 UserGestureIndicator gestureIndicator(m_userGestureToken.release()); | 141 UserGestureIndicator gestureIndicator(std::move(m_userGestureToken)); |
| 142 | 142 |
| 143 TRACE_EVENT1("devtools.timeline", "TimerFire", "data", | 143 TRACE_EVENT1("devtools.timeline", "TimerFire", "data", |
| 144 InspectorTimerFireEvent::data(context, m_timeoutID)); | 144 InspectorTimerFireEvent::data(context, m_timeoutID)); |
| 145 PerformanceMonitor::HandlerCall handlerCall( | 145 PerformanceMonitor::HandlerCall handlerCall( |
| 146 context, repeatInterval() ? "setInterval" : "setTimeout", true); | 146 context, repeatInterval() ? "setInterval" : "setTimeout", true); |
| 147 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( | 147 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( |
| 148 context, "timerFired", false); | 148 context, "timerFired", false); |
| 149 InspectorInstrumentation::AsyncTask asyncTask(context, this); | 149 InspectorInstrumentation::AsyncTask asyncTask(context, this); |
| 150 | 150 |
| 151 // Simple case for non-one-shot timers. | 151 // Simple case for non-one-shot timers. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 WebTaskRunner* DOMTimer::timerTaskRunner() const { | 187 WebTaskRunner* DOMTimer::timerTaskRunner() const { |
| 188 return getExecutionContext()->timers()->timerTaskRunner(); | 188 return getExecutionContext()->timers()->timerTaskRunner(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 DEFINE_TRACE(DOMTimer) { | 191 DEFINE_TRACE(DOMTimer) { |
| 192 visitor->trace(m_action); | 192 visitor->trace(m_action); |
| 193 SuspendableTimer::trace(visitor); | 193 SuspendableTimer::trace(visitor); |
| 194 } | 194 } |
| 195 | 195 |
| 196 } // namespace blink | 196 } // namespace blink |
| OLD | NEW |