Bug 514655: XHR response is not checked for null in extensions.xml [r=mark.finkle]
authorFabrice Desré <fabrice.desre@gmail.com>
Fri, 04 Sep 2009 09:17:07 -0400
changeset 829 c85417baafd132e303a73cde436f92b497e82d29
parent 828 83f6e92b08c22400de3abafdc1b72c4e6169a6ae
child 830 9f871d520f2aaaa32e8a00c8d090b2fd12e3d92d
push id715
push usermfinkle@mozilla.com
push dateFri, 04 Sep 2009 13:17:58 +0000
reviewersmark.finkle
bugs514655
Bug 514655: XHR response is not checked for null in extensions.xml [r=mark.finkle]
chrome/content/bindings/extensions.xml
--- a/chrome/content/bindings/extensions.xml
+++ b/chrome/content/bindings/extensions.xml
@@ -89,17 +89,19 @@
             if (box.hasChildNodes())
               return;
 
             // retrieve the extensions prefs
             let optionsURL = this.getAttribute("optionsURL");
             let xhr = new XMLHttpRequest();
             xhr.open("GET", optionsURL, false);
             xhr.send();
-
+            if (!xhr.responseXML)
+              return;
+            
             // Only allow <setting> for now
             let prefs = xhr.responseXML.querySelectorAll(":root > setting");
             for (let i = 0; i < prefs.length; i++)
               box.appendChild(prefs.item(i));
           ]]>
         </body>
       </method>
     </implementation>