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

Unified Diff: Source/platform/scroll/Scrollbar.h

Issue 1215973002: Oilpan: improve ScrollableArea handling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove too conservative null check Created 5 years, 6 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/platform/scroll/Scrollbar.h
diff --git a/Source/platform/scroll/Scrollbar.h b/Source/platform/scroll/Scrollbar.h
index 20979ff328b90fd6980364552842af5700a93e25..fd8224d8f90f25954a1c09bf5867f4ee5aad9e32 100644
--- a/Source/platform/scroll/Scrollbar.h
+++ b/Source/platform/scroll/Scrollbar.h
@@ -46,7 +46,6 @@ class ScrollableArea;
class ScrollbarTheme;
class PLATFORM_EXPORT Scrollbar : public Widget, public ScrollbarThemeClient {
-
public:
static PassRefPtrWillBeRawPtr<Scrollbar> create(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize);
@@ -153,6 +152,12 @@ public:
virtual DisplayItemClient displayItemClient() const override { return toDisplayItemClient(this); }
virtual String debugName() const override { return m_orientation == HorizontalScrollbar ? "HorizontalScrollbar" : "VerticalScrollbar"; }
+ EAGERLY_FINALIZE();
haraken 2015/06/29 15:20:22 Would you elaborate on why this needs to be eagerl
sof 2015/06/29 15:59:42 Unregistration from the ScrollbarTheme 'manager',
haraken 2015/06/30 10:30:35 ok, let's add some comment anyway :)
sof 2015/06/30 11:34:09 Done.
+#if ENABLE(OILPAN)
+ DECLARE_EAGER_FINALIZATION_OPERATOR_NEW();
haraken 2015/06/29 15:20:22 I'd prefer using pre-finalizers though. It wouldn'
sof 2015/06/29 15:59:42 I don't understand that argument about risk; could
haraken 2015/06/30 10:30:35 A pre-finalizer is allowed to touch any other on-h
sof 2015/06/30 11:34:08 Thanks for spelling those out; some comments..
+#endif
+ DECLARE_VIRTUAL_TRACE();
+
protected:
Scrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = 0);
@@ -167,18 +172,11 @@ protected:
ScrollDirectionPhysical pressedPartScrollDirectionPhysical();
ScrollGranularity pressedPartScrollGranularity();
- ScrollableArea* m_scrollableArea;
+ RawPtrWillBeMember<ScrollableArea> m_scrollableArea;
ScrollbarOrientation m_orientation;
ScrollbarControlSize m_controlSize;
ScrollbarTheme* m_theme;
haraken 2015/06/29 15:20:22 This raw pointer looks safe because the ScrollbarT
-#if ENABLE(OILPAN)
- // To simplify Oilpan finalization, keep a copy of the ScrollableArea's
- // scroll animator. Scrollbar is responsible for notifying the animator
- // when it is destructed.
- RefPtr<ScrollAnimator> m_animator;
-#endif
-
int m_visibleSize;
int m_totalSize;
float m_currentPos;

Powered by Google App Engine
This is Rietveld 408576698