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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGElementRareData.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/svg/SVGElementRareData.h" 5 #include "core/svg/SVGElementRareData.h"
6 6
7 #include "core/css/CSSCursorImageValue.h" 7 #include "core/css/CSSCursorImageValue.h"
8 #include "core/css/resolver/StyleResolver.h" 8 #include "core/css/resolver/StyleResolver.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/svg/SVGCursorElement.h" 10 #include "core/svg/SVGCursorElement.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 visitor->trace(m_correspondingElement); 42 visitor->trace(m_correspondingElement);
43 visitor->trace(m_owner); 43 visitor->trace(m_owner);
44 visitor->template registerWeakMembers<SVGElementRareData, &SVGElementRareDat a::processWeakMembers>(this); 44 visitor->template registerWeakMembers<SVGElementRareData, &SVGElementRareDat a::processWeakMembers>(this);
45 #endif 45 #endif
46 } 46 }
47 47
48 void SVGElementRareData::processWeakMembers(Visitor* visitor) 48 void SVGElementRareData::processWeakMembers(Visitor* visitor)
49 { 49 {
50 #if ENABLE(OILPAN) 50 #if ENABLE(OILPAN)
51 ASSERT(m_owner); 51 ASSERT(m_owner);
52 if (!Heap::isHeapObjectAlive(m_cursorElement)) 52 if (!ThreadHeap::isHeapObjectAlive(m_cursorElement))
53 m_cursorElement = nullptr; 53 m_cursorElement = nullptr;
54 54
55 if (!Heap::isHeapObjectAlive(m_cursorImageValue)) { 55 if (!ThreadHeap::isHeapObjectAlive(m_cursorImageValue)) {
56 // The owning SVGElement is still alive and if it is pointing to an SVGCursorElement 56 // The owning SVGElement is still alive and if it is pointing to an SVGCursorElement
57 // we unregister it when the CSSCursorImageValue dies. 57 // we unregister it when the CSSCursorImageValue dies.
58 if (m_cursorElement) { 58 if (m_cursorElement) {
59 m_cursorElement->removeReferencedElement(m_owner); 59 m_cursorElement->removeReferencedElement(m_owner);
60 m_cursorElement = nullptr; 60 m_cursorElement = nullptr;
61 } 61 }
62 m_cursorImageValue = nullptr; 62 m_cursorImageValue = nullptr;
63 } 63 }
64 ASSERT(!m_cursorElement || Heap::isHeapObjectAlive(m_cursorElement)); 64 ASSERT(!m_cursorElement || ThreadHeap::isHeapObjectAlive(m_cursorElement ));
65 ASSERT(!m_cursorImageValue || Heap::isHeapObjectAlive(m_cursorImageValue )); 65 ASSERT(!m_cursorImageValue || ThreadHeap::isHeapObjectAlive(m_cursorImag eValue));
66 #endif 66 #endif
67 } 67 }
68 68
69 AffineTransform* SVGElementRareData::animateMotionTransform() 69 AffineTransform* SVGElementRareData::animateMotionTransform()
70 { 70 {
71 return &m_animateMotionTransform; 71 return &m_animateMotionTransform;
72 } 72 }
73 73
74 } // namespace blink 74 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698