| Index: Source/core/frame/PlatformEventDispatcher.cpp | 
| diff --git a/Source/core/frame/PlatformEventDispatcher.cpp b/Source/core/frame/PlatformEventDispatcher.cpp | 
| index 397d7881752d3dd435ddd6410d8a191368f72f71..90113151d9af8910139ca91c6e712c31d23f5aba 100644 | 
| --- a/Source/core/frame/PlatformEventDispatcher.cpp | 
| +++ b/Source/core/frame/PlatformEventDispatcher.cpp | 
| @@ -16,10 +16,6 @@ PlatformEventDispatcher::PlatformEventDispatcher() | 
| { | 
| } | 
|  | 
| -PlatformEventDispatcher::~PlatformEventDispatcher() | 
| -{ | 
| -} | 
| - | 
| void PlatformEventDispatcher::addController(PlatformEventController* controller) | 
| { | 
| bool wasEmpty = m_controllers.isEmpty(); | 
| @@ -84,4 +80,24 @@ void PlatformEventDispatcher::notifyControllers() | 
| purgeControllers(); | 
| } | 
|  | 
| +void PlatformEventDispatcher::trace(Visitor* visitor) | 
| +{ | 
| +#if ENABLE(OILPAN) | 
| +    // Trace the backing store, the weak(&bare) element references won't be. | 
| +    visitor->trace(m_controllers); | 
| +    visitor->registerWeakMembers<PlatformEventDispatcher, &PlatformEventDispatcher::clearWeakMembers>(this); | 
| +#endif | 
| +} | 
| + | 
| +void PlatformEventDispatcher::clearWeakMembers(Visitor* visitor) | 
| +{ | 
| +    for (size_t i = 0; i < m_controllers.size(); ++i) { | 
| +        if (!visitor->isAlive(m_controllers[i])) { | 
| +            m_controllers[i] = nullptr; | 
| +            m_needsPurge = true; | 
| +        } | 
| +    } | 
| +    // Next notification will purge the empty slots. | 
| +} | 
| + | 
| } // namespace blink | 
|  |