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

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

Issue 2514643002: DevTools: support all handlers that end up with function call in perfmonitor. (Closed)
Patch Set: review comments addressed. Created 4 years, 1 month 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 ExecutionContext* context = getExecutionContext(); 127 ExecutionContext* context = getExecutionContext();
128 ASSERT(context); 128 ASSERT(context);
129 context->timers()->setTimerNestingLevel(m_nestingLevel); 129 context->timers()->setTimerNestingLevel(m_nestingLevel);
130 ASSERT(!context->activeDOMObjectsAreSuspended()); 130 ASSERT(!context->activeDOMObjectsAreSuspended());
131 // Only the first execution of a multi-shot timer should get an affirmative 131 // Only the first execution of a multi-shot timer should get an affirmative
132 // user gesture indicator. 132 // user gesture indicator.
133 UserGestureIndicator gestureIndicator(m_userGestureToken.release()); 133 UserGestureIndicator gestureIndicator(m_userGestureToken.release());
134 134
135 TRACE_EVENT1("devtools.timeline", "TimerFire", "data", 135 TRACE_EVENT1("devtools.timeline", "TimerFire", "data",
136 InspectorTimerFireEvent::data(context, m_timeoutID)); 136 InspectorTimerFireEvent::data(context, m_timeoutID));
137 PerformanceMonitor::HandlerCall handlerCall(context, m_action); 137 PerformanceMonitor::HandlerCall handlerCall(
138 context, repeatInterval() ? "setInterval" : "setTimeout", true);
138 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint( 139 InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
139 context, "timerFired", false); 140 context, "timerFired", false);
140 InspectorInstrumentation::AsyncTask asyncTask(context, this); 141 InspectorInstrumentation::AsyncTask asyncTask(context, this);
141 142
142 // Simple case for non-one-shot timers. 143 // Simple case for non-one-shot timers.
143 if (isActive()) { 144 if (isActive()) {
144 if (repeatInterval() && repeatInterval() < minimumInterval) { 145 if (repeatInterval() && repeatInterval() < minimumInterval) {
145 m_nestingLevel++; 146 m_nestingLevel++;
146 if (m_nestingLevel >= maxTimerNestingLevel) 147 if (m_nestingLevel >= maxTimerNestingLevel)
147 augmentRepeatInterval(minimumInterval - repeatInterval()); 148 augmentRepeatInterval(minimumInterval - repeatInterval());
(...skipping 28 matching lines...) Expand all
176 WebTaskRunner* DOMTimer::timerTaskRunner() const { 177 WebTaskRunner* DOMTimer::timerTaskRunner() const {
177 return getExecutionContext()->timers()->timerTaskRunner(); 178 return getExecutionContext()->timers()->timerTaskRunner();
178 } 179 }
179 180
180 DEFINE_TRACE(DOMTimer) { 181 DEFINE_TRACE(DOMTimer) {
181 visitor->trace(m_action); 182 visitor->trace(m_action);
182 SuspendableTimer::trace(visitor); 183 SuspendableTimer::trace(visitor);
183 } 184 }
184 185
185 } // namespace blink 186 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventTarget.cpp ('k') | third_party/WebKit/Source/core/frame/PerformanceMonitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698