| 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 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 * | 24 * |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "core/frame/DOMTimer.h" | 27 #include "core/frame/DOMTimer.h" |
| 28 | 28 |
| 29 #include "core/dom/ExecutionContext.h" | 29 #include "core/dom/ExecutionContext.h" |
| 30 #include "core/dom/TaskRunnerHelper.h" | 30 #include "core/dom/TaskRunnerHelper.h" |
| 31 #include "core/inspector/InspectorInstrumentation.h" | |
| 32 #include "core/inspector/InspectorTraceEvents.h" | 31 #include "core/inspector/InspectorTraceEvents.h" |
| 32 #include "core/probe/CoreProbes.h" |
| 33 #include "platform/instrumentation/tracing/TraceEvent.h" | 33 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 34 #include "wtf/CurrentTime.h" | 34 #include "wtf/CurrentTime.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 static const int maxIntervalForUserGestureForwarding = | 38 static const int maxIntervalForUserGestureForwarding = |
| 39 1000; // One second matches Gecko. | 39 1000; // One second matches Gecko. |
| 40 static const int maxTimerNestingLevel = 5; | 40 static const int maxTimerNestingLevel = 5; |
| 41 static const double oneMillisecond = 0.001; | 41 static const double oneMillisecond = 0.001; |
| 42 // Chromium uses a minimum timer interval of 4ms. We'd like to go | 42 // Chromium uses a minimum timer interval of 4ms. We'd like to go |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 RefPtr<WebTaskRunner> DOMTimer::timerTaskRunner() const { | 186 RefPtr<WebTaskRunner> DOMTimer::timerTaskRunner() const { |
| 187 return getExecutionContext()->timers()->timerTaskRunner(); | 187 return getExecutionContext()->timers()->timerTaskRunner(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 DEFINE_TRACE(DOMTimer) { | 190 DEFINE_TRACE(DOMTimer) { |
| 191 visitor->trace(m_action); | 191 visitor->trace(m_action); |
| 192 SuspendableTimer::trace(visitor); | 192 SuspendableTimer::trace(visitor); |
| 193 } | 193 } |
| 194 | 194 |
| 195 } // namespace blink | 195 } // namespace blink |
| OLD | NEW |