From 3df141cb85a530d7ddc3a7555d44235e49341837 Mon Sep 17 00:00:00 2001
From: Karl Tomlinson <karlt+@karlt.net>
Date: Sat, 19 Sep 2015 00:51:03 +1200
Subject: [PATCH] Bug 1206564 - skip copying of listeners. r=roc, a=sylvestre

--HG--
extra : source : ddd169d6bd65771a6811a3bb223a4a385b101690
---
 widget/gtk/nsWindow.cpp | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
index dd1895b..d8e8e42 100644
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -461,12 +461,11 @@ nsWindow::DispatchDeactivateEvent(void)
 void
 nsWindow::DispatchResized(int32_t aWidth, int32_t aHeight)
 {
-    nsIWidgetListener *listeners[] =
-        { mWidgetListener, mAttachedWidgetListener };
-    for (size_t i = 0; i < ArrayLength(listeners); ++i) {
-        if (listeners[i]) {
-            listeners[i]->WindowResized(this, aWidth, aHeight);
-        }
+    if (mWidgetListener) {
+        mWidgetListener->WindowResized(this, aWidth, aHeight);
+    }
+    if (mAttachedWidgetListener) {
+        mAttachedWidgetListener->WindowResized(this, aWidth, aHeight);
     }
 }
 
-- 
2.5.0

