| Index: Source/WebCore/dom/Document.cpp
 | 
| ===================================================================
 | 
| --- Source/WebCore/dom/Document.cpp	(revision 102462)
 | 
| +++ Source/WebCore/dom/Document.cpp	(working copy)
 | 
| @@ -612,7 +612,9 @@
 | 
|  
 | 
|  #if ENABLE(REQUEST_ANIMATION_FRAME)
 | 
|          // FIXME: consider using ActiveDOMObject.
 | 
| -        m_scriptedAnimationController = nullptr;
 | 
| +        if (m_scriptedAnimationController)
 | 
| +            m_scriptedAnimationController->clearDocumentPointer();
 | 
| +        m_scriptedAnimationController.clear();
 | 
|  #endif
 | 
|  
 | 
|  #ifndef NDEBUG
 | 
| @@ -1824,7 +1826,9 @@
 | 
|  
 | 
|  #if ENABLE(REQUEST_ANIMATION_FRAME)
 | 
|      // FIXME: consider using ActiveDOMObject.
 | 
| -    m_scriptedAnimationController = nullptr;
 | 
| +    if (m_scriptedAnimationController)
 | 
| +        m_scriptedAnimationController->clearDocumentPointer();
 | 
| +    m_scriptedAnimationController.clear();
 | 
|  #endif
 | 
|  
 | 
|      RenderObject* render = renderer();
 | 
| 
 |