Chromium Code Reviews| Index: Source/core/frame/PlatformEventDispatcher.cpp |
| diff --git a/Source/core/frame/PlatformEventDispatcher.cpp b/Source/core/frame/PlatformEventDispatcher.cpp |
| index ef830041074bd43b1bae495015b1d10981c5ea2a..12c0d214f6d4df87a366cdb900fac69c186f5514 100644 |
| --- a/Source/core/frame/PlatformEventDispatcher.cpp |
| +++ b/Source/core/frame/PlatformEventDispatcher.cpp |
| @@ -19,9 +19,12 @@ PlatformEventDispatcher::PlatformEventDispatcher() |
| void PlatformEventDispatcher::addController(PlatformEventController* controller) |
| { |
| ASSERT(controller); |
| - ASSERT(!m_controllers.contains(controller)); |
| - m_controllers.add(controller); |
| + // FIXME: If we can avoid registering a controller twice, we can change |
|
haraken
2015/09/04 05:32:45
FIXME => TODO
peria
2015/09/04 05:41:18
Done.
|
| + // this 'if' to ASSERT. |
| + if (!m_controllers.contains(controller)) |
|
haraken
2015/09/04 05:32:45
Would't it be better to early-return if the contro
peria
2015/09/04 05:41:18
Done.
|
| + m_controllers.add(controller); |
| + |
| if (!m_isListening) { |
| startListening(); |
| m_isListening = true; |