Workarround fix for suck compiler
authorromashin
Sat, 19 Apr 2008 18:33:59 +0300
changeset 16786 392cdce17512da6d717a2118ddd7f5db1618de23
parent 16785 73b5a061d6be8909f4d0c23a84fa8d5149f41259
child 16787 5441e105cd7949a243ed40d2b49738bad73d5cde
push id1298
push userpavlov@mozilla.com
push dateSun, 17 Aug 2008 05:03:09 +0000
treeherderautoland@4a506fa751d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0a1pre
Workarround fix for suck compiler
widget/src/qt/nsCommonWidget.cpp
--- a/widget/src/qt/nsCommonWidget.cpp
+++ b/widget/src/qt/nsCommonWidget.cpp
@@ -802,26 +802,27 @@ nsCommonWidget::SetPreferredSize(int w, 
 }
 
 NS_IMETHODIMP
 nsCommonWidget::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus &aStatus)
 {
     aStatus = nsEventStatus_eIgnore;
 
     // hold a widget reference while we dispatch this event
-    NS_ADDREF(aEvent->widget);
+    nsIWidget* widget = aEvent->widget;
+    NS_ADDREF(widget);
 
     if (mEventCallback)
         aStatus = (*mEventCallback)(aEvent);
 
     // dispatch to event listener if event was not consumed
     if ((aStatus != nsEventStatus_eIgnore) && mEventListener)
         aStatus = mEventListener->ProcessEvent(*aEvent);
 
-    NS_IF_RELEASE(aEvent->widget);
+    NS_IF_RELEASE(widget);
 
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsCommonWidget::CaptureRollupEvents(nsIRollupListener*, PRBool, PRBool)
 {
     return NS_OK;