Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: third_party/WebKit/Source/core/frame/DOMTimer.cpp

Issue 2346663004: Moving platform tracing things into platform/tracing. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
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/inspector/InspectorInstrumentation.h" 30 #include "core/inspector/InspectorInstrumentation.h"
31 #include "core/inspector/InspectorTraceEvents.h" 31 #include "core/inspector/InspectorTraceEvents.h"
32 #include "platform/TraceEvent.h" 32 #include "platform/tracing/TraceEvent.h"
33 #include "wtf/CurrentTime.h" 33 #include "wtf/CurrentTime.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 static const int maxIntervalForUserGestureForwarding = 1000; // One second match es Gecko. 37 static const int maxIntervalForUserGestureForwarding = 1000; // One second match es Gecko.
38 static const int maxTimerNestingLevel = 5; 38 static const int maxTimerNestingLevel = 5;
39 static const double oneMillisecond = 0.001; 39 static const double oneMillisecond = 0.001;
40 // Chromium uses a minimum timer interval of 4ms. We'd like to go 40 // Chromium uses a minimum timer interval of 4ms. We'd like to go
41 // lower; however, there are poorly coded websites out there which do 41 // lower; however, there are poorly coded websites out there which do
42 // create CPU-spinning loops. Using 4ms prevents the CPU from 42 // create CPU-spinning loops. Using 4ms prevents the CPU from
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return getExecutionContext()->timers()->timerTaskRunner(); 161 return getExecutionContext()->timers()->timerTaskRunner();
162 } 162 }
163 163
164 DEFINE_TRACE(DOMTimer) 164 DEFINE_TRACE(DOMTimer)
165 { 165 {
166 visitor->trace(m_action); 166 visitor->trace(m_action);
167 SuspendableTimer::trace(visitor); 167 SuspendableTimer::trace(visitor);
168 } 168 }
169 169
170 } // namespace blink 170 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698