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

Unified Diff: Source/core/rendering/RenderScrollbar.cpp

Issue 603193005: Move the Widget hierarchy to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ~Scrollbar assert Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderScrollbar.cpp
diff --git a/Source/core/rendering/RenderScrollbar.cpp b/Source/core/rendering/RenderScrollbar.cpp
index 05520a317f4ef3ba992b7781ab845b2713c62f91..a4f860e8ea093d4d7027d1a90320e08a722e418c 100644
--- a/Source/core/rendering/RenderScrollbar.cpp
+++ b/Source/core/rendering/RenderScrollbar.cpp
@@ -36,9 +36,9 @@
namespace blink {
-PassRefPtr<Scrollbar> RenderScrollbar::createCustomScrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, LocalFrame* owningFrame)
+PassRefPtrWillBeRawPtr<Scrollbar> RenderScrollbar::createCustomScrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, LocalFrame* owningFrame)
{
- return adoptRef(new RenderScrollbar(scrollableArea, orientation, ownerNode, owningFrame));
+ return adoptRefWillBeNoop(new RenderScrollbar(scrollableArea, orientation, ownerNode, owningFrame));
}
RenderScrollbar::RenderScrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, Node* ownerNode, LocalFrame* owningFrame)
@@ -75,10 +75,22 @@ RenderScrollbar::~RenderScrollbar()
// Meanwhile, we can have a call to updateScrollbarPart which recreates the
// scrollbar part. So, we need to destroy these parts since we don't want them
// to call on a destroyed scrollbar. See webkit bug 68009.
haraken 2014/09/29 14:16:36 The culprit of the complexity is this bug. How har
sof 2014/10/02 14:03:54 Someone with rendering knowledge is better qualifi
+ //
+ // Oilpan: see comment next to m_parts declaration why this is
+ // safe to do and required.
updateScrollbarParts(true);
}
}
+void RenderScrollbar::trace(Visitor* visitor)
+{
+#if ENABLE(OILPAN)
+ visitor->trace(m_owner);
+ visitor->trace(m_owningFrame);
+#endif
+ Scrollbar::trace(visitor);
+}
+
RenderBox* RenderScrollbar::owningRenderer() const
{
if (m_owningFrame) {

Powered by Google App Engine
This is Rietveld 408576698