Bug 1045826 - Add missing null check in popup blocking (r=felipe)
authorBill McCloskey <wmccloskey@mozilla.com>
Mon, 18 Aug 2014 16:18:28 -0700
changeset 200215 e2dd99b59ec139bbd572407dc34fc185541521a7
parent 200214 f9daf1a7141a76412f8985fa868e748f3f4125fe
child 200216 2ad221f9aca912d68192bafc55ad5a99a0fbbde2
push id47839
push userwmccloskey@mozilla.com
push dateMon, 18 Aug 2014 23:19:22 +0000
treeherdermozilla-inbound@e2dd99b59ec1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1045826
milestone34.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 1045826 - Add missing null check in popup blocking (r=felipe)
toolkit/content/widgets/browser.xml
--- a/toolkit/content/widgets/browser.xml
+++ b/toolkit/content/widgets/browser.xml
@@ -840,23 +840,25 @@
       -->
       <method name="_receiveMessage">
         <parameter name="aMessage"/>
         <body><![CDATA[
           let data = aMessage.data;
           switch (aMessage.name) {
             case "PopupBlocking:UpdateBlockedPopups": {
               this.blockedPopups = data.blockedPopups;
-              for (let i = 0; i < this.blockedPopups.length; i++) {
-                let scope = Components.utils.import("resource://gre/modules/BrowserUtils.jsm", {});
-                let uri = scope.BrowserUtils.makeURI(this.blockedPopups[i].popupWindowURI);
-                this.blockedPopups[i].popupWindowURI = uri;
-              }
-              if (data.freshPopup) {
-                this.blockedPopups.reported = false;
+              if (this.blockedPopups) {
+                for (let i = 0; i < this.blockedPopups.length; i++) {
+                  let scope = Components.utils.import("resource://gre/modules/BrowserUtils.jsm", {});
+                  let uri = scope.BrowserUtils.makeURI(this.blockedPopups[i].popupWindowURI);
+                  this.blockedPopups[i].popupWindowURI = uri;
+                }
+                if (data.freshPopup) {
+                  this.blockedPopups.reported = false;
+                }
               }
               this.updateBlockedPopups();
               break;
             }
             case "Autoscroll:Start": {
               if (!this.autoscrollEnabled) {
                 return false;
               }