Closed Bug 575579 Opened 9 years ago Closed 9 years ago

Errors when loading the panel error console

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: vingtetun, Assigned: vingtetun)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
When the iframe of the error console is created, forms.js/util.js/content.js are loaded into the iframe scope. 
content.js send a ViewportMetadata message from an iframe without any assigned tab and an error is throw in the console:

Error: tab is null
Source File: chrome://browser/content/browser.js
Line: 1272
Attachment #454830 - Flags: review?(mark.finkle)
Attachment #454830 - Flags: review?(mark.finkle) → review+
Comment on attachment 454830 [details] [diff] [review]
Patch


>       case "Browser:ViewportMetadata":
>         let tab = Browser.getTabForBrowser(aMessage.target);
>+        // Some browser such as iframes loaded dynamically into the chrome UI
>+        // does not have any assigned tab
>+        if (!tab)
>+          return;
>+
>         tab.updateViewportMetadata(json);
>         break;

I would have gone with:

  if (!tab)
    tab.updateViewportMetadata(json);


I don't know if one pattern is better the another
http://hg.mozilla.org/mobile-browser/rev/42ffb4922559
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
verified FIXED on builds:

Mozilla/5.0 (X11; U; Linux armv71; Nokia N900; en-US; rv:2.0b2pre) Gecko/2010630 Namoroka/4.0b2pre Fennec/2.0a1pre

and latest-electrolysis-maemo5-gtk
Status: RESOLVED → VERIFIED
bugspam
Assignee: nobody → 21
You need to log in before you can comment on or make changes to this bug.