Bug 604352 - JavaScript error: browser-ui.js, line 2677: req.responseXML is null [r=mbrubeck]
authorMark Finkle <mfinkle@mozilla.com>
Fri, 15 Oct 2010 08:40:29 -0400
changeset 66838 62cd6c6c7e9e98f680e3e6c324ff63bbdc951a83
parent 66837 2cbc42743401709b017e3f95547bba3064e38b58
child 66839 3284ba225f6a5865ca60db44dbafc7941a4deecb
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs604352
Bug 604352 - JavaScript error: browser-ui.js, line 2677: req.responseXML is null [r=mbrubeck]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -2669,17 +2669,17 @@ var BadgeHandlers = {
 
         // Get the feed and read the count, passing any saved username and password
         // but do not show any security dialogs if we fail
         let req = new XMLHttpRequest();
         req.mozBackgroundRequest = true;
         req.open("GET", "https://mail.google.com/mail/feed/atom", true, login.username, login.password);
         req.onreadystatechange = function(aEvent) {
           if (req.readyState == 4) {
-            if (req.status == 200) {
+            if (req.status == 200 && req.responseXML) {
               let count = req.responseXML.getElementsByTagName("fullcount");
               this._lastCount = count ? count[0].childNodes[0].nodeValue : 0;
             } else {
               this._lastCount = 0;
             }
             this._lastCount = BadgeHandlers.setNumberBadge(aBadge, this._lastCount);
           }
         };