Spurious [JavaScript Error: "TypeError: window is null" {file: "jar:jar:file:///data/app/org.mozilla.fennec_jan-2/base.apk!/assets/omni.ja!/components/SessionStore.js" line: 384}] on startup

RESOLVED FIXED in Firefox 52

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: JanH, Assigned: JanH)

Tracking

Trunk
Firefox 54
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox51 wontfix, firefox52 fixed, firefox-esr52 fixed, firefox53 fixed, firefox54 fixed)

Details

Attachments

(1 attachment)

Depending on how our startup plays out exactly, the window might not be ready at this point. There's no real harm done here I think - without a window we can't really do anything and that code isn't relevant on a cold startup anyway, so just adding an "if (window)" should be enough.
Comment on attachment 8836471 [details]
Bug 1338893 - Don't use the window on application-foreground if it doesn't yet exist.

https://reviewboard.mozilla.org/r/111892/#review113270
Attachment #8836471 - Flags: review?(s.kaspari) → review+
Pushed by mozilla@buttercookie.de:
https://hg.mozilla.org/integration/autoland/rev/3bfcb88ae88d
Don't use the window on application-foreground if it doesn't yet exist. r=sebastian
https://hg.mozilla.org/mozilla-central/rev/3bfcb88ae88d
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Comment on attachment 8836471 [details]
Bug 1338893 - Don't use the window on application-foreground if it doesn't yet exist.

Approval Request Comment
[Feature/Bug causing the regression]: Probably bug 1300647
[User impact if declined]: We might occasionally generate an unhandled exception in our JS code during startup, although I'm not sure whether this causes any user-visible breakage or not.
[Is this code covered by automated tests?]: Partially.
[Has the fix been verified in Nightly?]: Yes.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: None.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: Just adding a missing null-check.
[String changes made/needed]: none
Attachment #8836471 - Flags: approval-mozilla-beta?
Attachment #8836471 - Flags: approval-mozilla-aurora?
Comment on attachment 8836471 [details]
Bug 1338893 - Don't use the window on application-foreground if it doesn't yet exist.

Fix a potential unhandled JS exception. Aurora53+.
Attachment #8836471 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
needs rebase for aurora

grafting 398607:3bfcb88ae88d "Bug 1338893 - Don't use the window on application-foreground if it doesn't yet exist. r=sebastian"
merging mobile/android/components/SessionStore.js
warning: conflicts while merging mobile/android/components/SessionStore.js! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(jh+bugzilla)
Flags: needinfo?(jh+bugzilla)
Comment on attachment 8836471 [details]
Bug 1338893 - Don't use the window on application-foreground if it doesn't yet exist.

null check to fix an exception in fennec, beta52+
Attachment #8836471 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.