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

()

Firefox for Android
General
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: JanH, Assigned: JanH)

Tracking

Trunk
Firefox 54
All
Android
Points:
---

Firefox Tracking Flags

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

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

9 months ago
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 hidden (mozreview-request)

Comment 2

9 months ago
mozreview-review
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+

Comment 3

9 months ago
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

Comment 4

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3bfcb88ae88d
Status: NEW → RESOLVED
Last Resolved: 9 months ago
status-firefox54: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
(Assignee)

Comment 5

9 months ago
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 6

9 months ago
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)
status-firefox51: fix-optional → wontfix

Comment 8

9 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/f0337e400f8d
status-firefox53: affected → fixed
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+

Comment 10

9 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/189be0f13dfc
status-firefox52: affected → fixed

Comment 11

9 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-esr52/rev/189be0f13dfc
status-firefox-esr52: --- → fixed
You need to log in before you can comment on or make changes to this bug.