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

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

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // will be removed at the end of executeCallbacks() 48 // will be removed at the end of executeCallbacks()
49 return; 49 return;
50 } 50 }
51 } 51 }
52 } 52 }
53 53
54 void FrameRequestCallbackCollection::executeCallbacks(double highResNowMs, doubl e highResNowMsLegacy) 54 void FrameRequestCallbackCollection::executeCallbacks(double highResNowMs, doubl e highResNowMsLegacy)
55 { 55 {
56 // First, generate a list of callbacks to consider. Callbacks registered fr om this point 56 // First, generate a list of callbacks to consider. Callbacks registered fr om this point
57 // on are considered only for the "next" frame, not this one. 57 // on are considered only for the "next" frame, not this one.
58 ASSERT(m_callbacksToInvoke.isEmpty()); 58 DCHECK(m_callbacksToInvoke.isEmpty());
59 m_callbacksToInvoke.swap(m_callbacks); 59 m_callbacksToInvoke.swap(m_callbacks);
60 60
61 for (size_t i = 0; i < m_callbacksToInvoke.size(); ++i) { 61 for (size_t i = 0; i < m_callbacksToInvoke.size(); ++i) {
62 FrameRequestCallback* callback = m_callbacksToInvoke[i].get(); 62 FrameRequestCallback* callback = m_callbacksToInvoke[i].get();
63 if (!callback->m_cancelled) { 63 if (!callback->m_cancelled) {
64 TRACE_EVENT1("devtools.timeline", "FireAnimationFrame", "data", Insp ectorAnimationFrameEvent::data(m_context, callback->m_id)); 64 TRACE_EVENT1("devtools.timeline", "FireAnimationFrame", "data", Insp ectorAnimationFrameEvent::data(m_context, callback->m_id));
65 InspectorInstrumentation::allowNativeBreakpoint(m_context, "animatio nFrameFired", false); 65 InspectorInstrumentation::allowNativeBreakpoint(m_context, "animatio nFrameFired", false);
66 InspectorInstrumentation::AsyncTask asyncTask(m_context, callback); 66 InspectorInstrumentation::AsyncTask asyncTask(m_context, callback);
67 if (callback->m_useLegacyTimeBase) 67 if (callback->m_useLegacyTimeBase)
68 callback->handleEvent(highResNowMsLegacy); 68 callback->handleEvent(highResNowMsLegacy);
69 else 69 else
70 callback->handleEvent(highResNowMs); 70 callback->handleEvent(highResNowMs);
71 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEven t::data()); 71 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEven t::data());
72 } 72 }
73 } 73 }
74 74
75 m_callbacksToInvoke.clear(); 75 m_callbacksToInvoke.clear();
76 } 76 }
77 77
78 DEFINE_TRACE(FrameRequestCallbackCollection) 78 DEFINE_TRACE(FrameRequestCallbackCollection)
79 { 79 {
80 visitor->trace(m_callbacks); 80 visitor->trace(m_callbacks);
81 visitor->trace(m_callbacksToInvoke); 81 visitor->trace(m_callbacksToInvoke);
82 visitor->trace(m_context); 82 visitor->trace(m_context);
83 } 83 }
84 84
85 } // namespace blink 85 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/FlexibleArrayBufferView.h ('k') | third_party/WebKit/Source/core/dom/Fullscreen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698