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
This commit is contained in:
bzbarsky%mit.edu
2006-11-14 22:30:33 +00:00
parent 51f1acd6d8
commit a308018d0e

View File

@@ -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<nsIDocShellTreeItem> shellAsTreeItem =
do_QueryReferent(win->mTargetableShells[i]);
if (shellAsTreeItem) {