Closed
Bug 833050
Opened 12 years ago
Closed 12 years ago
JS errors during startup
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 21
People
(Reporter: mfinkle, Unassigned)
Details
Attachments
(1 file)
1.83 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
Looking at the logcat of a Ts test run, I noticed some JS errors:
01-21 06:37:21.310 E/GeckoConsole( 5131): zerdatime 1358750241313 - browser chrome startup finished.
01-21 06:37:21.437 D/GeckoLayerClient( 5131): Screen-size changed to (1024,768)
01-21 06:37:21.437 D/GeckoLayerClient( 5131): Window-size changed to (1024,695)
01-21 06:37:21.810 E/ ( 1020): Couldn't find or open 'accelerometer_tegra' driver (Not a typewriter)
01-21 06:37:21.817 E/GeckoConsole( 5131): [JavaScript Error: "TypeError: aBrowser is null" {file: "chrome://browser/content/browser.js" line: 1014}]
This can happen if aBrowser is null and that can happen in several of the code paths. I add a simple null check to getFocusedInput.
And:
01-21 06:37:23.717 D/GeckoApp( 5131): State - 786448
01-21 06:37:23.717 D/GeckoApp( 5131): Got a document stop event.
01-21 06:37:23.717 I/GeckoToolbar( 5131): zerdatime 566933 - Throbber stop
01-21 06:37:23.787 W/SensorService( 1020): listener with binder android.os.BinderProxy@484570b8, doesn't exist (sensor=tegra_accelerometer, id=1)
01-21 06:37:24.437 E/GeckoConsole( 5131): [JavaScript Error: "NS_ERR_R_FAILURE: Component returned failure code: 0x80004005 (NS_ERR_R_FAILURE) [nsIDOMWindowUtils.isFirstPaint]" {file: "chrome://browser/content/browser.js" line: 527}]
This would seem to happen if the pressShell is not yet created. I wrapped the call in a try/catch and return false in the exception.
Attachment #704618 -
Flags: review?(bugmail.mozilla)
Comment 1•12 years ago
|
||
Comment on attachment 704618 [details] [diff] [review]
patch
> isBrowserContentDocumentDisplayed: function() {
>- if (window.top.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).isFirstPaint)
>+ try {
>+ if (window.top.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).isFirstPaint)
>+ return false;
>+ catch (e) {
> return false;
>+ }
>+
This is missing a close-brace before the "catch". r=me with that fixed
Attachment #704618 -
Flags: review?(bugmail.mozilla) → review+
Reporter | ||
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Assignee | ||
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•