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

Side by Side Diff: third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp

Issue 2733093003: DevTools: instrument user callbacks based on generic probes, remove NativeBreakpoint. (Closed)
Patch Set: test fixed Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/FrameRequestCallbackCollection.h" 5 #include "core/dom/FrameRequestCallbackCollection.h"
6 6
7 #include "core/dom/FrameRequestCallback.h" 7 #include "core/dom/FrameRequestCallback.h"
8 #include "core/inspector/InspectorInstrumentation.h" 8 #include "core/inspector/InspectorInstrumentation.h"
9 #include "core/inspector/InspectorTraceEvents.h" 9 #include "core/inspector/InspectorTraceEvents.h"
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // First, generate a list of callbacks to consider. Callbacks registered from 62 // First, generate a list of callbacks to consider. Callbacks registered from
63 // this point on are considered only for the "next" frame, not this one. 63 // this point on are considered only for the "next" frame, not this one.
64 DCHECK(m_callbacksToInvoke.isEmpty()); 64 DCHECK(m_callbacksToInvoke.isEmpty());
65 m_callbacksToInvoke.swap(m_callbacks); 65 m_callbacksToInvoke.swap(m_callbacks);
66 66
67 for (const auto& callback : m_callbacksToInvoke) { 67 for (const auto& callback : m_callbacksToInvoke) {
68 if (!callback->m_cancelled) { 68 if (!callback->m_cancelled) {
69 TRACE_EVENT1( 69 TRACE_EVENT1(
70 "devtools.timeline", "FireAnimationFrame", "data", 70 "devtools.timeline", "FireAnimationFrame", "data",
71 InspectorAnimationFrameEvent::data(m_context, callback->m_id)); 71 InspectorAnimationFrameEvent::data(m_context, callback->m_id));
72 probe::AsyncTask asyncTask(m_context, callback, 72 probe::AsyncTask asyncTask(m_context, callback);
73 "requestAnimationFrame.callback");
74 probe::UserCallback probe(m_context, "requestAnimationFrame", 73 probe::UserCallback probe(m_context, "requestAnimationFrame",
75 AtomicString(), true); 74 AtomicString(), true);
76 if (callback->m_useLegacyTimeBase) 75 if (callback->m_useLegacyTimeBase)
77 callback->handleEvent(highResNowMsLegacy); 76 callback->handleEvent(highResNowMsLegacy);
78 else 77 else
79 callback->handleEvent(highResNowMs); 78 callback->handleEvent(highResNowMs);
80 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), 79 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"),
81 "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", 80 "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data",
82 InspectorUpdateCountersEvent::data()); 81 InspectorUpdateCountersEvent::data());
83 } 82 }
84 } 83 }
85 84
86 m_callbacksToInvoke.clear(); 85 m_callbacksToInvoke.clear();
87 } 86 }
88 87
89 DEFINE_TRACE(FrameRequestCallbackCollection) { 88 DEFINE_TRACE(FrameRequestCallbackCollection) {
90 visitor->trace(m_callbacks); 89 visitor->trace(m_callbacks);
91 visitor->trace(m_callbacksToInvoke); 90 visitor->trace(m_callbacksToInvoke);
92 visitor->trace(m_context); 91 visitor->trace(m_context);
93 } 92 }
94 93
95 } // namespace blink 94 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698