nsBrowserGlue.js, line 952: TypeError: win is null (_sendMediaTelemetry)

RESOLVED FIXED in Firefox 57

Status

()

Firefox
General
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: florian, Assigned: Felipe)

Tracking

Trunk
Firefox 57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

()

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

Attachments

(1 attachment)

(Reporter)

Description

2 months ago
_sendMediaTelemetry now runs from an idle callback started off _scheduleArbitrarilyLateIdleTasks, and can run at a time when there's no browser window, which means RecentWindow.getMostRecentBrowserWindow() can return null.
(Assignee)

Updated

2 months ago
Assignee: nobody → felipc
Status: NEW → ASSIGNED
Comment hidden (mozreview-request)
(Reporter)

Comment 2

2 months ago
Comment on attachment 8905242 [details]
Bug 1397232 - Use the hidden window to report media telemetry.

I discussed this with Felipe yesterday over IRC. I don't think silencing the error and silently failing to collect telemetry data is a good idea. From our discussion, it seems the best path forward is to avoid using RecentWindow.jsm, and instead use the hidden window.
Attachment #8905242 - Flags: review?(florian)
Comment hidden (mozreview-request)
(Assignee)

Updated

2 months ago
Attachment #8905242 - Flags: review?(cpearce)
(Reporter)

Comment 4

2 months ago
mozreview-review
Comment on attachment 8905242 [details]
Bug 1397232 - Use the hidden window to report media telemetry.

https://reviewboard.mozilla.org/r/177032/#review182474

::: browser/components/nsBrowserGlue.js:952
(Diff revision 2)
>      this._firstWindowLoaded();
>    },
>  
>    _sendMediaTelemetry() {
> -    let win = RecentWindow.getMostRecentBrowserWindow();
> +    let win = Services.appShell.hiddenDOMWindow;
> +    if (win) {

I don't think we need this null check when using the hidden window. I guess it's a leftover from the previous version of the patch.
Comment hidden (mozreview-request)
(Reporter)

Comment 6

2 months ago
mozreview-review
Comment on attachment 8905242 [details]
Bug 1397232 - Use the hidden window to report media telemetry.

https://reviewboard.mozilla.org/r/177032/#review182890

LGTM
Attachment #8905242 - Flags: review?(florian) → review+

Comment 7

2 months ago
Pushed by felipc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4f3ba0330ce0
Use the hidden window to report media telemetry. r=florian
https://hg.mozilla.org/mozilla-central/rev/4f3ba0330ce0
Status: ASSIGNED → RESOLVED
Last Resolved: 2 months ago
status-firefox57: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
You need to log in before you can comment on or make changes to this bug.