Bug 1224233 - fix crashy usage of IMENotificationSender::Run using on-screen keyboard on Windows, r=smaug
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 12 Nov 2015 15:56:01 +0000
changeset 308653 f3ab1f50450af2a5380be725373ba4672326f401
parent 308652 9e61ae324d135478280c09b5f493e9d375109334
child 308654 d34f0bd09295241efba3c390e0b0c1b612984f41
push id7513
push useratolfsen@mozilla.com
push dateFri, 13 Nov 2015 14:03:43 +0000
reviewerssmaug
bugs1224233
milestone45.0a1
Bug 1224233 - fix crashy usage of IMENotificationSender::Run using on-screen keyboard on Windows, r=smaug
dom/events/IMEContentObserver.cpp
--- a/dom/events/IMEContentObserver.cpp
+++ b/dom/events/IMEContentObserver.cpp
@@ -1400,17 +1400,18 @@ IMEContentObserver::TryToFlushPendingNot
 {
   if (!mQueuedSender || mSendingNotification != NOTIFY_IME_OF_NOTHING) {
     return;
   }
 
   MOZ_LOG(sIMECOLog, LogLevel::Debug,
     ("IMECO: 0x%p IMEContentObserver::TryToFlushPendingNotifications(), "
      "performing queued IMENotificationSender forcibly", this));
-  mQueuedSender->Run();
+  RefPtr<IMENotificationSender> queuedSender = mQueuedSender;
+  queuedSender->Run();
 }
 
 /******************************************************************************
  * mozilla::IMEContentObserver::AChangeEvent
  ******************************************************************************/
 
 bool
 IMEContentObserver::AChangeEvent::CanNotifyIME(