Last Comment Bug 701245 - JavaScript Error: "browser is null" {file: "chrome://browser/content/browser.js" line: 1091}
: JavaScript Error: "browser is null" {file: "chrome://browser/content/browser....
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
P2 normal (vote)
: ---
Assigned To: Mark Finkle (:mfinkle) (use needinfo?)
: Sebastian Kaspari (:sebastian)
Depends on:
  Show dependency treegraph
Reported: 2011-11-09 17:03 PST by Wesley Johnston (:wesj)
Modified: 2013-12-31 04:39 PST (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Testpage (155 bytes, text/html)
2011-11-09 17:04 PST, Wesley Johnston (:wesj)
no flags Details
patch (964 bytes, patch)
2011-11-11 09:36 PST, Mark Finkle (:mfinkle) (use needinfo?)
no flags Details | Diff | Splinter Review
patch 2 (2.51 KB, patch)
2011-11-11 12:36 PST, Mark Finkle (:mfinkle) (use needinfo?)
wjohnston2000: review+
Details | Diff | Splinter Review

Description User image Wesley Johnston (:wesj) 2011-11-09 17:03:42 PST
This may be a dup?

I'm seeing this on pages with iframes. Presumably we're getting some web progress event from them, trying to get the associated browser and then use it. We could probably just see we have no browser and back off. We don't want to send progress events from iframes to java anyway... do we? Maybe on sites like gmail we want to show a spinner while the iframe loads?
Comment 1 User image Wesley Johnston (:wesj) 2011-11-09 17:04:36 PST
Created attachment 573378 [details]

This is just a page with an iframe to reproduce the error on.
Comment 2 User image Mark Finkle (:mfinkle) (use needinfo?) 2011-11-11 09:34:25 PST
This was happening in the DOMContentLoaded event handler. We looked for the <browser> associated with the (HTMLDocument) but didn't find one. Then we try to set focus to the null browser.
Comment 3 User image Mark Finkle (:mfinkle) (use needinfo?) 2011-11-11 09:36:19 PST
Created attachment 573833 [details] [diff] [review]

No errors using the test page anymore. I stopped trying to focus the browser too. We don't need it. The keyboard comes up fine on Google and Bugzilla without forcing focus.
Comment 4 User image Mark Finkle (:mfinkle) (use needinfo?) 2011-11-11 12:36:31 PST
Created attachment 573896 [details] [diff] [review]
patch 2

adds more checks
Comment 5 User image Mark Finkle (:mfinkle) (use needinfo?) 2011-11-11 20:23:05 PST
Comment 6 User image Andreea Pod 2011-11-24 07:10:15 PST
I loaded the test page and I looked in aLogcat, there was no JavaScript Error. Marking this as verified fixed on build: Mozilla /5.0 (Android;Linux armv7l;rv:11.0a1) Gecko/20111123 Firefox/11.0a1 Fennec/11.0a1
Device: LG Optimus 2X (Android 2.2)

Note You need to log in before you can comment on or make changes to this bug.