| Index: Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp | 
| diff --git a/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp b/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp | 
| index bb3d55ce33746ecf121ab814f27c981cc85ba63f..efd7abba32930d53bc37bbb1fbd6ad93efa8aa23 100644 | 
| --- a/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp | 
| +++ b/Source/core/paint/DeprecatedPaintLayerScrollableArea.cpp | 
| @@ -90,6 +90,9 @@ DeprecatedPaintLayerScrollableArea::DeprecatedPaintLayerScrollableArea(Deprecate | 
| , m_needsCompositedScrolling(false) | 
| , m_scrollCorner(nullptr) | 
| , m_resizer(nullptr) | 
| +#if ENABLE(ASSERT) | 
| +    , m_hasBeenDisposed(false) | 
| +#endif | 
| { | 
| Node* node = box().node(); | 
| if (node && node->isElementNode()) { | 
| @@ -106,6 +109,11 @@ DeprecatedPaintLayerScrollableArea::DeprecatedPaintLayerScrollableArea(Deprecate | 
|  | 
| DeprecatedPaintLayerScrollableArea::~DeprecatedPaintLayerScrollableArea() | 
| { | 
| +    ASSERT(m_hasBeenDisposed); | 
| +} | 
| + | 
| +void DeprecatedPaintLayerScrollableArea::dispose() | 
| +{ | 
| if (inResizeMode() && !box().documentBeingDestroyed()) { | 
| if (LocalFrame* frame = box().frame()) | 
| frame->eventHandler().resizeScrollableAreaDestroyed(); | 
| @@ -142,6 +150,19 @@ DeprecatedPaintLayerScrollableArea::~DeprecatedPaintLayerScrollableArea() | 
| m_scrollCorner->destroy(); | 
| if (m_resizer) | 
| m_resizer->destroy(); | 
| + | 
| +    clearScrollAnimators(); | 
| + | 
| +#if ENABLE(ASSERT) | 
| +    m_hasBeenDisposed = true; | 
| +#endif | 
| +} | 
| + | 
| +DEFINE_TRACE(DeprecatedPaintLayerScrollableArea) | 
| +{ | 
| +    visitor->trace(m_hBar); | 
| +    visitor->trace(m_vBar); | 
| +    ScrollableArea::trace(visitor); | 
| } | 
|  | 
| HostWindow* DeprecatedPaintLayerScrollableArea::hostWindow() const | 
| @@ -935,7 +956,7 @@ PassRefPtrWillBeRawPtr<Scrollbar> DeprecatedPaintLayerScrollableArea::createScro | 
|  | 
| void DeprecatedPaintLayerScrollableArea::destroyScrollbar(ScrollbarOrientation orientation) | 
| { | 
| -    RefPtrWillBePersistent<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar; | 
| +    RefPtrWillBeMember<Scrollbar>& scrollbar = orientation == HorizontalScrollbar ? m_hBar : m_vBar; | 
| if (!scrollbar) | 
| return; | 
|  | 
|  |