bug 726483 pass newly allocated runnable to NS_DispatchToCurrentThread() r=roc a=bustage
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 11 Nov 2015 14:20:36 +1300
changeset 296749 e4802c73f705
parent 296748 c66289e84c50
child 296750 d8f0412f38f7
push id5317
push userkwierso@gmail.com
push date2015-11-16 21:37 +0000
treeherdermozilla-beta@e4802c73f705 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, bustage
bugs726483
milestone43.0
bug 726483 pass newly allocated runnable to NS_DispatchToCurrentThread() r=roc a=bustage For 43, which does not have https://hg.mozilla.org/mozilla-central/rev/9400b5b4f6da#l1.17
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2415,19 +2415,18 @@ nsWindow::OnSizeAllocate(GtkAllocation *
     }
 
     mBounds.SizeTo(size);
 
     // Gecko permits running nested event loops during processing of events,
     // GtkWindow callers of gtk_widget_size_allocate expect the signal
     // handlers to return sometime in the near future.
     mNeedsDispatchResized = true;
-    nsCOMPtr<nsIRunnable> r =
-        NS_NewRunnableMethod(this, &nsWindow::MaybeDispatchResized);
-    NS_DispatchToCurrentThread(r.forget());
+    auto r = NS_NewRunnableMethod(this, &nsWindow::MaybeDispatchResized);
+    NS_DispatchToCurrentThread(r);
 }
 
 void
 nsWindow::OnDeleteEvent()
 {
     if (mWidgetListener)
         mWidgetListener->RequestWindowClose(this);
 }