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

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

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 , m_action(action) 87 , m_action(action)
88 { 88 {
89 ASSERT(timeoutID > 0); 89 ASSERT(timeoutID > 0);
90 if (shouldForwardUserGesture(interval, m_nestingLevel)) 90 if (shouldForwardUserGesture(interval, m_nestingLevel))
91 m_userGestureToken = UserGestureIndicator::currentToken(); 91 m_userGestureToken = UserGestureIndicator::currentToken();
92 92
93 double intervalMilliseconds = max(oneMillisecond, interval * oneMillisecond) ; 93 double intervalMilliseconds = max(oneMillisecond, interval * oneMillisecond) ;
94 if (intervalMilliseconds < minimumInterval && m_nestingLevel >= maxTimerNest ingLevel) 94 if (intervalMilliseconds < minimumInterval && m_nestingLevel >= maxTimerNest ingLevel)
95 intervalMilliseconds = minimumInterval; 95 intervalMilliseconds = minimumInterval;
96 if (singleShot) 96 if (singleShot)
97 startOneShot(intervalMilliseconds); 97 startOneShot(intervalMilliseconds, FROM_HERE);
98 else 98 else
99 startRepeating(intervalMilliseconds); 99 startRepeating(intervalMilliseconds, FROM_HERE);
100 } 100 }
101 101
102 DOMTimer::~DOMTimer() 102 DOMTimer::~DOMTimer()
103 { 103 {
104 } 104 }
105 105
106 int DOMTimer::timeoutID() const 106 int DOMTimer::timeoutID() const
107 { 107 {
108 return m_timeoutID; 108 return m_timeoutID;
109 } 109 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 if (fireTime - alignedTimeRoundedDown < minimumInterval) 191 if (fireTime - alignedTimeRoundedDown < minimumInterval)
192 return alignedTimeRoundedDown; 192 return alignedTimeRoundedDown;
193 193
194 return alignedTimeRoundedUp; 194 return alignedTimeRoundedUp;
195 } 195 }
196 196
197 return fireTime; 197 return fireTime;
198 } 198 }
199 199
200 } // namespace WebCore 200 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698