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

Unified Diff: third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp

Issue 2700293002: DevTools: do not use RAII for sync native breakpoints, reuse AsyncTask where possible. (Closed)
Patch Set: same with unused assert removed - assert is trivial Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/frame/DOMTimer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp
diff --git a/third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp b/third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp
index 167ddabab2933155039ddfd1914ec85c9a0a2386..550fbb1dc528808c1c148d6170fb9781255517e1 100644
--- a/third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp
+++ b/third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp
@@ -26,19 +26,16 @@ FrameRequestCallbackCollection::registerCallback(
TRACE_EVENT_INSTANT1("devtools.timeline", "RequestAnimationFrame",
TRACE_EVENT_SCOPE_THREAD, "data",
InspectorAnimationFrameEvent::data(m_context, id));
- InspectorInstrumentation::asyncTaskScheduled(
+ InspectorInstrumentation::asyncTaskScheduledBreakable(
m_context, "requestAnimationFrame", callback);
- InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
- m_context, "DOMWindow.requestAnimationFrame", true);
return id;
}
void FrameRequestCallbackCollection::cancelCallback(CallbackId id) {
for (size_t i = 0; i < m_callbacks.size(); ++i) {
if (m_callbacks[i]->m_id == id) {
- InspectorInstrumentation::asyncTaskCanceled(m_context, m_callbacks[i]);
- InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
- m_context, "DOMWindow.cancelAnimationFrame", true);
+ InspectorInstrumentation::asyncTaskCanceledBreakable(
+ m_context, "cancelAnimationFrame", m_callbacks[i]);
m_callbacks.remove(i);
TRACE_EVENT_INSTANT1("devtools.timeline", "CancelAnimationFrame",
TRACE_EVENT_SCOPE_THREAD, "data",
@@ -48,9 +45,8 @@ void FrameRequestCallbackCollection::cancelCallback(CallbackId id) {
}
for (const auto& callback : m_callbacksToInvoke) {
if (callback->m_id == id) {
- InspectorInstrumentation::asyncTaskCanceled(m_context, callback);
- InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
- m_context, "DOMWindow.cancelAnimationFrame", true);
+ InspectorInstrumentation::asyncTaskCanceledBreakable(
+ m_context, "cancelAnimationFrame", callback);
TRACE_EVENT_INSTANT1("devtools.timeline", "CancelAnimationFrame",
TRACE_EVENT_SCOPE_THREAD, "data",
InspectorAnimationFrameEvent::data(m_context, id));
@@ -74,9 +70,8 @@ void FrameRequestCallbackCollection::executeCallbacks(
TRACE_EVENT1(
"devtools.timeline", "FireAnimationFrame", "data",
InspectorAnimationFrameEvent::data(m_context, callback->m_id));
- InspectorInstrumentation::NativeBreakpoint nativeBreakpoint(
- m_context, "DOMWindow.requestAnimationFrame.callback", false);
- InspectorInstrumentation::AsyncTask asyncTask(m_context, callback);
+ InspectorInstrumentation::AsyncTask asyncTask(
+ m_context, callback, "requestAnimationFrame.callback");
PerformanceMonitor::HandlerCall handlerCall(
m_context, "requestAnimationFrame", true);
if (callback->m_useLegacyTimeBase)
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/frame/DOMTimer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698