Bug 798677, make sure events are fully handled in editor, r=ehsan, a=lsblakk
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sun, 21 Oct 2012 15:35:47 +0300
changeset 109610 78c9d125aef44e552b55ec482e6d4511c16b7dae
parent 109607 a0073727b12420eeb120da259c516dc9e3185d4a
child 109611 e77259feea479b8003c1fe0919c598d0973c4bb1
push id1574
push useropettay@mozilla.com
push dateMon, 22 Oct 2012 15:28:35 +0000
treeherdermozilla-beta@e77259feea47 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan, lsblakk
bugs798677
milestone17.0
Bug 798677, make sure events are fully handled in editor, r=ehsan, a=lsblakk
editor/libeditor/base/nsEditorEventListener.cpp
--- a/editor/libeditor/base/nsEditorEventListener.cpp
+++ b/editor/libeditor/base/nsEditorEventListener.cpp
@@ -280,16 +280,17 @@ NS_IMPL_ISUPPORTS1(nsEditorEventListener
 /**
  *  nsIDOMEventListener implementation
  */
 
 NS_IMETHODIMP
 nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent)
 {
   NS_ENSURE_TRUE(mEditor, NS_ERROR_NOT_AVAILABLE);
+  nsCOMPtr<nsIEditor> kungFuDeathGrip = mEditor;
 
   nsAutoString eventType;
   aEvent->GetType(eventType);
 
   nsCOMPtr<nsIDOMDragEvent> dragEvent = do_QueryInterface(aEvent);
   if (dragEvent) {
     if (eventType.EqualsLiteral("dragenter"))
       return DragEnter(dragEvent);