Bug 1397232 - Use the hidden window to report media telemetry. r=florian

A normal window might not exist when this is called, for example on Mac where it's possible to close all windows but not the application. This has been true since bug 1362212 moved it to an idle observer.

MozReview-Commit-ID: EcL941XKTeP

--HG--
extra : rebase_source : a2ca06a0452b00e7800aec3adcc9ce2066b42c7c
This commit is contained in:
Felipe Gomes 2017-09-08 17:03:25 -03:00
Родитель f6077dace1
Коммит ec6d7ef449
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -924,7 +924,7 @@ BrowserGlue.prototype = {
},
_sendMediaTelemetry() {
let win = RecentWindow.getMostRecentBrowserWindow();
let win = Services.appShell.hiddenDOMWindow;
let v = win.document.createElementNS("http://www.w3.org/1999/xhtml", "video");
v.reportCanPlayTelemetry();
},