Bug 1397232 - Use the hidden window to report media telemetry. r=florian
authorFelipe Gomes <felipc@gmail.com>
Fri, 08 Sep 2017 17:03:25 -0300
changeset 429305 4f3ba0330ce0f3eb60c909e97581a5c6146ce7ac
parent 429304 d923714255be7364e9c60487942c5c918c88d3e9
child 429306 a1892b9d40c427effa6145901712d65ae065227d
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1397232, 1362212
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -919,17 +919,17 @@ BrowserGlue.prototype = {
 
     PageActions.init();
 
     this._firstWindowTelemetry(aWindow);
     this._firstWindowLoaded();
   },
 
   _sendMediaTelemetry() {
-    let win = RecentWindow.getMostRecentBrowserWindow();
+    let win = Services.appShell.hiddenDOMWindow;
     let v = win.document.createElementNS("http://www.w3.org/1999/xhtml", "video");
     v.reportCanPlayTelemetry();
   },
 
   /**
    * Application shutdown handler.
    */
   _onQuitApplicationGranted() {