Bug 622479 - Ensure IME events don't try to use a destroyed TabParent. r=cjones a=b-f
authorJosh Matthews <josh@joshmatthews.net>
Fri, 21 Jan 2011 11:48:56 -0500
changeset 62109 a4aadd1f8ce46752c7cfc1a498c6f115d7fffc59
parent 62108 165b354e3ec9d02049d5c3bd6ae62e799dd2acf6
child 62110 d21aa818cd7b469361d2415e09e9929fa55b3360
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewerscjones, b-f
bugs622479
milestone2.0b12pre
Bug 622479 - Ensure IME events don't try to use a destroyed TabParent. r=cjones a=b-f
dom/ipc/TabParent.cpp
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -124,16 +124,18 @@ TabParent::Destroy()
       static_cast<RenderFrameParent*>(ManagedPRenderFrameParent()[i]);
     rfp->Destroy();
   }
 }
 
 void
 TabParent::ActorDestroy(ActorDestroyReason why)
 {
+  if (mIMETabParent == this)
+    mIMETabParent = nsnull;
   nsRefPtr<nsFrameLoader> frameLoader = GetFrameLoader();
   if (frameLoader) {
     frameLoader->DestroyChild();
   }
 }
 
 bool
 TabParent::RecvMoveFocus(const bool& aForward)