From a308018d0e29839d81d042d65e1ad2b643fcdacd Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 14 Nov 2006 22:30:33 +0000 Subject: [PATCH] Once we find a window, stop looking, dammit. Bug 360579, s+sr=jst git-svn-id: svn://10.0.0.236/trunk@215288 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp b/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp index ba88c1209d2..8cd4e92fd90 100644 --- a/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp +++ b/mozilla/xpfe/appshell/src/nsContentTreeOwner.cpp @@ -255,7 +255,7 @@ NS_IMETHODIMP nsContentTreeOwner::FindItemWithName(const PRUnichar* aName, if (win) { PRInt32 count = win->mTargetableShells.Count(); PRInt32 i; - for (i = 0; i < count; ++i) { + for (i = 0; i < count && !*aFoundItem; ++i) { nsCOMPtr shellAsTreeItem = do_QueryReferent(win->mTargetableShells[i]); if (shellAsTreeItem) {