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 12 matching lines...) Expand all Loading... |
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 "config.h" | 27 #include "config.h" |
28 #include "DOMTimer.h" | 28 #include "DOMTimer.h" |
29 | 29 |
30 #include "InspectorInstrumentation.h" | 30 #include "InspectorInstrumentation.h" |
31 #include "ScheduledAction.h" | 31 #include "ScheduledAction.h" |
32 #include "ScriptExecutionContext.h" | 32 #include "ScriptExecutionContext.h" |
33 #include "WebCoreMemoryInstrumentation.h" | |
34 #include <wtf/CurrentTime.h> | 33 #include <wtf/CurrentTime.h> |
35 #include <wtf/HashSet.h> | 34 #include <wtf/HashSet.h> |
36 #include <wtf/StdLibExtras.h> | 35 #include <wtf/StdLibExtras.h> |
37 | 36 |
38 using namespace std; | 37 using namespace std; |
39 | 38 |
40 namespace WebCore { | 39 namespace WebCore { |
41 | 40 |
42 static const int maxIntervalForUserGestureForwarding = 1000; // One second match
es Gecko. | 41 static const int maxIntervalForUserGestureForwarding = 1000; // One second match
es Gecko. |
43 static const int maxTimerNestingLevel = 5; | 42 static const int maxTimerNestingLevel = 5; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 if (fireTime <= currentTime) | 193 if (fireTime <= currentTime) |
195 return fireTime; | 194 return fireTime; |
196 | 195 |
197 double alignedTime = ceil(fireTime / alignmentInterval) * alignmentInter
val; | 196 double alignedTime = ceil(fireTime / alignmentInterval) * alignmentInter
val; |
198 return alignedTime; | 197 return alignedTime; |
199 } | 198 } |
200 | 199 |
201 return fireTime; | 200 return fireTime; |
202 } | 201 } |
203 | 202 |
204 void DOMTimer::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const | |
205 { | |
206 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); | |
207 SuspendableTimer::reportMemoryUsage(memoryObjectInfo); | |
208 info.addMember(m_action, "action"); | |
209 info.addMember(m_userGestureToken, "userGestureToken"); | |
210 } | |
211 | |
212 } // namespace WebCore | 203 } // namespace WebCore |
OLD | NEW |