Bug 1077652 - tabbrowser should ignore DOMTitleChanged events from browser that have no tab assigned r=dao
authorTim Taubert <ttaubert@mozilla.com>
Wed, 19 Nov 2014 15:27:42 +0100
changeset 216761 103ffeaa554dc878f489a18d2ba8223b6a192b63
parent 216760 24b3d7de368227361616b7580d9c27234276d117
child 216762 38d12e852c4bbbd167401be9c52b397115fe2018
push id27860
push userkwierso@gmail.com
push dateFri, 21 Nov 2014 01:56:00 +0000
treeherdermozilla-central@893013d8d714 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1077652
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1077652 - tabbrowser should ignore DOMTitleChanged events from browser that have no tab assigned r=dao
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -3460,17 +3460,17 @@
           if (!event.isTrusted)
             return;
 
           var contentWin = event.target.defaultView;
           if (contentWin != contentWin.top)
             return;
 
           var tab = this._getTabForContentWindow(contentWin);
-          if (tab.hasAttribute("pending"))
+          if (!tab || tab.hasAttribute("pending"))
             return;
 
           var titleChanged = this.setTabTitle(tab);
           if (titleChanged && !tab.selected && !tab.hasAttribute("busy"))
             tab.setAttribute("titlechanged", "true");
         ]]>
       </handler>
       <handler event="oop-browser-crashed">