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

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

Issue 2646633002: IntersectionObserver: remove gc-timing-revealing execeptions. (Closed)
Patch Set: Created 3 years, 11 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/ElementIntersectionObserverData.h" 5 #include "core/dom/ElementIntersectionObserverData.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/IntersectionObservation.h" 8 #include "core/dom/IntersectionObservation.h"
9 #include "core/dom/IntersectionObserver.h" 9 #include "core/dom/IntersectionObserver.h"
10 #include "core/dom/IntersectionObserverController.h" 10 #include "core/dom/IntersectionObserverController.h"
(...skipping 15 matching lines...) Expand all
26 m_intersectionObservers.add(&observer); 26 m_intersectionObservers.add(&observer);
27 } 27 }
28 28
29 void ElementIntersectionObserverData::removeObserver( 29 void ElementIntersectionObserverData::removeObserver(
30 IntersectionObserver& observer) { 30 IntersectionObserver& observer) {
31 m_intersectionObservers.remove(&observer); 31 m_intersectionObservers.remove(&observer);
32 } 32 }
33 33
34 void ElementIntersectionObserverData::addObservation( 34 void ElementIntersectionObserverData::addObservation(
35 IntersectionObservation& observation) { 35 IntersectionObservation& observation) {
36 DCHECK(observation.observer());
36 m_intersectionObservations.add( 37 m_intersectionObservations.add(
37 TraceWrapperMember<IntersectionObserver>(this, &observation.observer()), 38 TraceWrapperMember<IntersectionObserver>(this, observation.observer()),
38 &observation); 39 &observation);
39 } 40 }
40 41
41 void ElementIntersectionObserverData::removeObservation( 42 void ElementIntersectionObserverData::removeObservation(
42 IntersectionObserver& observer) { 43 IntersectionObserver& observer) {
43 m_intersectionObservations.remove(&observer); 44 m_intersectionObservations.remove(&observer);
44 } 45 }
45 46
46 void ElementIntersectionObserverData::activateValidIntersectionObservers( 47 void ElementIntersectionObserverData::activateValidIntersectionObservers(
47 Node& node) { 48 Node& node) {
(...skipping 21 matching lines...) Expand all
69 visitor->trace(m_intersectionObservations); 70 visitor->trace(m_intersectionObservations);
70 } 71 }
71 72
72 DEFINE_TRACE_WRAPPERS(ElementIntersectionObserverData) { 73 DEFINE_TRACE_WRAPPERS(ElementIntersectionObserverData) {
73 for (auto& entry : m_intersectionObservations) { 74 for (auto& entry : m_intersectionObservations) {
74 visitor->traceWrappers(entry.key); 75 visitor->traceWrappers(entry.key);
75 } 76 }
76 } 77 }
77 78
78 } // namespace blink 79 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698