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

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

Issue 1596333002: Revert of Oilpan: Fix weak processing for IntersectionObserver::m_root (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObserver.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 310 }
311 311
312 bool IntersectionObserver::hasPercentMargin() const 312 bool IntersectionObserver::hasPercentMargin() const
313 { 313 {
314 return (m_topMargin.type() == Percent 314 return (m_topMargin.type() == Percent
315 || m_rightMargin.type() == Percent 315 || m_rightMargin.type() == Percent
316 || m_bottomMargin.type() == Percent 316 || m_bottomMargin.type() == Percent
317 || m_leftMargin.type() == Percent); 317 || m_leftMargin.type() == Percent);
318 } 318 }
319 319
320 #if ENABLE(OILPAN) 320 void IntersectionObserver::rootDisappearedCallback(Visitor* visitor, void* self)
321 void IntersectionObserver::clearWeakMembers(Visitor* visitor)
322 { 321 {
323 if (Heap::isHeapObjectAlive(m_root)) 322 IntersectionObserver* observer = static_cast<IntersectionObserver*>(self);
324 return; 323 observer->disconnect();
325 disconnect();
326 m_root = nullptr;
327 } 324 }
328 #endif
329 325
330 DEFINE_TRACE(IntersectionObserver) 326 DEFINE_TRACE(IntersectionObserver)
331 { 327 {
332 #if ENABLE(OILPAN) 328 #if ENABLE(OILPAN)
333 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs erver::clearWeakMembers>(this); 329 visitor->registerWeakMembers(this, m_root.get(), IntersectionObserver::rootD isappearedCallback);
334 #endif 330 #endif
335 visitor->trace(m_callback); 331 visitor->trace(m_callback);
332 visitor->trace(m_root);
336 visitor->trace(m_observations); 333 visitor->trace(m_observations);
337 visitor->trace(m_entries); 334 visitor->trace(m_entries);
338 } 335 }
339 336
340 } // namespace blink 337 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/IntersectionObserver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698