Bug 1137229 - Fix breakage in IMEInputHandler::OnDestroyWidget(). r=masayuki a=lmandel
authorSteven Michaud <smichaud@pobox.com>
Thu, 12 Mar 2015 15:00:00 -0500
changeset 250367 f8c988045bb5
parent 250366 81009105d11d
child 250368 2d58dd0bfaf7
push id4563
push usersmichaud@pobox.com
push date2015-03-12 20:00 +0000
treeherdermozilla-beta@f8c988045bb5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki, lmandel
bugs1137229
milestone37.0
Bug 1137229 - Fix breakage in IMEInputHandler::OnDestroyWidget(). r=masayuki a=lmandel
widget/cocoa/TextInputHandler.mm
--- a/widget/cocoa/TextInputHandler.mm
+++ b/widget/cocoa/TextInputHandler.mm
@@ -3307,16 +3307,20 @@ IMEInputHandler::OnDestroyWidget(nsChild
      TrueOrFalse(IsIMEComposing())));
 
   // If we're not focused, the focused IMEInputHandler may have been
   // created by another widget/nsChildView.
   if (sFocusedIMEHandler && sFocusedIMEHandler != this) {
     sFocusedIMEHandler->OnDestroyWidget(aDestroyingWidget);
   }
 
+  if (!TextInputHandlerBase::OnDestroyWidget(aDestroyingWidget)) {
+    return false;
+  }
+
   if (IsIMEComposing()) {
     // If our view is in the composition, we should clean up it.
     CancelIMEComposition();
     OnEndIMEComposition();
   }
 
   mSelectedRange.location = NSNotFound; // Marking dirty
   mIMEHasFocus = false;