Bug 502574 - Defunct loop in onTitleChanged. r=dao
authorJohn P Baker <john.p.baker@bristol.ac.uk>
Tue, 07 Jul 2009 14:15:06 +0200
changeset 30055 263cbbfeda99a81240df5fd794e06535984e5c15
parent 30054 eb4d03b6f5f9c723182500851ff1a91a3df48983
child 30056 a60b78ae0793d7cfe308dea8db1d46c304f9a6d8
push idunknown
push userunknown
push dateunknown
reviewersdao
bugs502574
milestone1.9.2a1pre
Bug 502574 - Defunct loop in onTitleChanged. r=dao
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -936,22 +936,16 @@
 
       <method name="onTitleChanged">
         <parameter name="evt"/>
         <body>
           <![CDATA[
             if (evt.target != this.contentDocument)
               return;
 
-            var i = 0;
-            for ( ; i < this.parentNode.parentNode.childNodes.length; i++) {
-              if (this.parentNode.parentNode.childNodes[i].firstChild == this)
-                break;
-            }
-
             var tabBrowser = this.parentNode.parentNode.parentNode.parentNode;
 
             var tab = document.getAnonymousElementByAttribute(tabBrowser, "linkedpanel", this.parentNode.id);
             tabBrowser.setTabTitle(tab);
 
             if (tab == tabBrowser.mCurrentTab)
               tabBrowser.updateTitlebar();
           ]]>