Bug 575579 - Errors when loading the panel error console [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Tue, 29 Jun 2010 20:33:33 +0200
changeset 1679 42ffb49225590043ce5b9a41da3fed91b6d41a36
parent 1678 50239a7fa3c37fa994e0180370c400a9849f53cb
child 1680 8f3efa051b275a91754888221874c97b6aed3e59
push id1508
push uservnicolas@mozilla.com
push dateTue, 29 Jun 2010 18:35:15 +0000
reviewersmfinkle
bugs575579
Bug 575579 - Errors when loading the panel error console [r=mfinkle]
chrome/content/browser.js
--- a/chrome/content/browser.js
+++ b/chrome/content/browser.js
@@ -1269,17 +1269,20 @@ var Browser = {
     let dummy = getComputedStyle(document.documentElement, "").width;
   },
 
   receiveMessage: function receiveMessage(aMessage) {
     let json = aMessage.json;
     switch (aMessage.name) {
       case "Browser:ViewportMetadata":
         let tab = Browser.getTabForBrowser(aMessage.target);
-        tab.updateViewportMetadata(json);
+        // Some browser such as iframes loaded dynamically into the chrome UI
+        // does not have any assigned tab
+        if (tab)
+          tab.updateViewportMetadata(json);
         break;
 
       case "Browser:FormSubmit":
         let browser = aMessage.target;
         browser.lastLocation = null;
         break;
 
       case "Browser:ZoomToPoint:Return":