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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/IntersectionObserver.h" 5 #include "core/dom/IntersectionObserver.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "core/css/parser/CSSParserTokenRange.h" 8 #include "core/css/parser/CSSParserTokenRange.h"
9 #include "core/css/parser/CSSTokenizer.h" 9 #include "core/css/parser/CSSTokenizer.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 default: 150 default:
151 ASSERT_NOT_REACHED(); 151 ASSERT_NOT_REACHED();
152 break; 152 break;
153 } 153 }
154 root.document().ensureIntersectionObserverController().addTrackedObserver(*t his); 154 root.document().ensureIntersectionObserverController().addTrackedObserver(*t his);
155 } 155 }
156 156
157 #if ENABLE(OILPAN) 157 #if ENABLE(OILPAN)
158 void IntersectionObserver::clearWeakMembers(Visitor* visitor) 158 void IntersectionObserver::clearWeakMembers(Visitor* visitor)
159 { 159 {
160 if (Heap::isHeapObjectAlive(m_root)) 160 if (ThreadHeap::isHeapObjectAlive(m_root))
161 return; 161 return;
162 disconnect(); 162 disconnect();
163 m_root = nullptr; 163 m_root = nullptr;
164 } 164 }
165 #endif 165 #endif
166 166
167 LayoutObject* IntersectionObserver::rootLayoutObject() const 167 LayoutObject* IntersectionObserver::rootLayoutObject() const
168 { 168 {
169 Node* node = rootNode(); 169 Node* node = rootNode();
170 if (node->isDocumentNode()) 170 if (node->isDocumentNode())
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 { 318 {
319 #if ENABLE(OILPAN) 319 #if ENABLE(OILPAN)
320 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs erver::clearWeakMembers>(this); 320 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs erver::clearWeakMembers>(this);
321 #endif 321 #endif
322 visitor->trace(m_callback); 322 visitor->trace(m_callback);
323 visitor->trace(m_observations); 323 visitor->trace(m_observations);
324 visitor->trace(m_entries); 324 visitor->trace(m_entries);
325 } 325 }
326 326
327 } // namespace blink 327 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ElementData.cpp ('k') | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698