| 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 f9e64696d88eabc642ffd84a452930ddfaf6d860..d8c7cb0e3216960bfe008252bd563e5d0c43cffe 100644
|
| --- a/third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/FrameRequestCallbackCollection.cpp
|
| @@ -23,7 +23,7 @@ FrameRequestCallbackCollection::CallbackId FrameRequestCallbackCollection::regis
|
| m_callbacks.append(callback);
|
|
|
| TRACE_EVENT_INSTANT1("devtools.timeline", "RequestAnimationFrame", TRACE_EVENT_SCOPE_THREAD, "data", InspectorAnimationFrameEvent::data(m_context, id));
|
| - InspectorInstrumentation::didRequestAnimationFrame(m_context, id);
|
| + InspectorInstrumentation::scheduleAsyncTask(m_context, "requestAnimationFrame", callback);
|
|
|
| return id;
|
| }
|
| @@ -32,16 +32,16 @@ void FrameRequestCallbackCollection::cancelCallback(CallbackId id)
|
| {
|
| for (size_t i = 0; i < m_callbacks.size(); ++i) {
|
| if (m_callbacks[i]->m_id == id) {
|
| - m_callbacks.remove(i);
|
| + InspectorInstrumentation::cancelAsyncTask(m_context, m_callbacks[i]);
|
| TRACE_EVENT_INSTANT1("devtools.timeline", "CancelAnimationFrame", TRACE_EVENT_SCOPE_THREAD, "data", InspectorAnimationFrameEvent::data(m_context, id));
|
| - InspectorInstrumentation::didCancelAnimationFrame(m_context, id);
|
| + m_callbacks.remove(i);
|
| return;
|
| }
|
| }
|
| for (size_t i = 0; i < m_callbacksToInvoke.size(); ++i) {
|
| if (m_callbacksToInvoke[i]->m_id == id) {
|
| + InspectorInstrumentation::cancelAsyncTask(m_context, m_callbacks[i]);
|
| TRACE_EVENT_INSTANT1("devtools.timeline", "CancelAnimationFrame", TRACE_EVENT_SCOPE_THREAD, "data", InspectorAnimationFrameEvent::data(m_context, id));
|
| - InspectorInstrumentation::didCancelAnimationFrame(m_context, id);
|
| m_callbacksToInvoke[i]->m_cancelled = true;
|
| // will be removed at the end of executeCallbacks()
|
| return;
|
| @@ -60,12 +60,11 @@ void FrameRequestCallbackCollection::executeCallbacks(double highResNowMs, doubl
|
| FrameRequestCallback* callback = m_callbacksToInvoke[i].get();
|
| if (!callback->m_cancelled) {
|
| TRACE_EVENT1("devtools.timeline", "FireAnimationFrame", "data", InspectorAnimationFrameEvent::data(m_context, callback->m_id));
|
| - InspectorInstrumentationCookie cookie = InspectorInstrumentation::willFireAnimationFrame(m_context, callback->m_id);
|
| + InspectorInstrumentation::AsyncTask asyncTask(m_context, callback);
|
| if (callback->m_useLegacyTimeBase)
|
| callback->handleEvent(highResNowMsLegacy);
|
| else
|
| callback->handleEvent(highResNowMs);
|
| - InspectorInstrumentation::didFireAnimationFrame(cookie);
|
| TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data());
|
| }
|
| }
|
|
|