Bug 1177011 - Ignore restarting the same content observer in EventStateManager. r=masayuki, a=lmandel
authorJim Chen <nchen@mozilla.com>
Mon, 06 Jul 2015 09:54:04 -0400
changeset 268750 364a4843ad22ae060a2d634966b25b89541f5d01
parent 268749 68f8a8129260f0a95d82c6fbee7d8fa64ce7db98
child 268751 25666390d98cb4f85a53e358325dbf77789933f1
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki, lmandel
bugs1177011
milestone41.0a2
Bug 1177011 - Ignore restarting the same content observer in EventStateManager. r=masayuki, a=lmandel
dom/events/EventStateManager.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -450,16 +450,19 @@ EventStateManager::ReleaseCurrentIMECont
   }
   mIMEContentObserver = nullptr;
 }
 
 void
 EventStateManager::OnStartToObserveContent(
                      IMEContentObserver* aIMEContentObserver)
 {
+  if (mIMEContentObserver == aIMEContentObserver) {
+    return;
+  }
   ReleaseCurrentIMEContentObserver();
   mIMEContentObserver = aIMEContentObserver;
 }
 
 void
 EventStateManager::OnStopObservingContent(
                      IMEContentObserver* aIMEContentObserver)
 {