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

Side by Side Diff: third_party/WebKit/Source/core/dom/IntersectionObserverController.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/IntersectionObserverController.h" 5 #include "core/dom/IntersectionObserverController.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/IdleRequestOptions.h" 8 #include "core/dom/IdleRequestOptions.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // If the callback fired while DOM objects were suspended, notifications mig ht be late, so deliver 46 // If the callback fired while DOM objects were suspended, notifications mig ht be late, so deliver
47 // them right away (rather than waiting to fire again). 47 // them right away (rather than waiting to fire again).
48 if (m_callbackFiredWhileSuspended) { 48 if (m_callbackFiredWhileSuspended) {
49 m_callbackFiredWhileSuspended = false; 49 m_callbackFiredWhileSuspended = false;
50 deliverIntersectionObservations(); 50 deliverIntersectionObservations();
51 } 51 }
52 } 52 }
53 53
54 void IntersectionObserverController::handleEvent(IdleDeadline*) 54 void IntersectionObserverController::handleEvent(IdleDeadline*)
55 { 55 {
56 ASSERT(m_callbackID); 56 DCHECK(m_callbackID);
57 m_callbackID = 0; 57 m_callbackID = 0;
58 deliverIntersectionObservations(); 58 deliverIntersectionObservations();
59 } 59 }
60 60
61 void IntersectionObserverController::deliverIntersectionObservations() 61 void IntersectionObserverController::deliverIntersectionObservations()
62 { 62 {
63 if (getExecutionContext()->activeDOMObjectsAreSuspended()) { 63 if (getExecutionContext()->activeDOMObjectsAreSuspended()) {
64 m_callbackFiredWhileSuspended = true; 64 m_callbackFiredWhileSuspended = true;
65 return; 65 return;
66 } 66 }
(...skipping 30 matching lines...) Expand all
97 97
98 DEFINE_TRACE(IntersectionObserverController) 98 DEFINE_TRACE(IntersectionObserverController)
99 { 99 {
100 visitor->trace(m_trackedIntersectionObservers); 100 visitor->trace(m_trackedIntersectionObservers);
101 visitor->trace(m_pendingIntersectionObservers); 101 visitor->trace(m_pendingIntersectionObservers);
102 ActiveDOMObject::trace(visitor); 102 ActiveDOMObject::trace(visitor);
103 IdleRequestCallback::trace(visitor); 103 IdleRequestCallback::trace(visitor);
104 } 104 }
105 105
106 } // namespace blink 106 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObserver.cpp ('k') | third_party/WebKit/Source/core/dom/LayoutTreeBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698