зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1362212 - Remove canPlayTelemetry from _delayedStartup. r=dao
Calling HTMLMediaElement.canPlayType() on the main thread will cause us to do disk I/O to load system decoding libraries, so we shouldn't do it on the main thread, let alone on the parent process' main thread. I moved the telemetry into an idle service observer off main thread into Gecko in the previous patch. MozReview-Commit-ID: CH6LNNLzreJ --HG-- extra : rebase_source : 9219c63b4f8e18d127988d1debcc8712037e5406
This commit is contained in:
Родитель
aa3f97c3ef
Коммит
0f91138b92
|
@ -1547,20 +1547,6 @@ var gBrowserInit = {
|
||||||
this.gmpInstallManager.simpleCheckAndInstall().then(null, () => {});
|
this.gmpInstallManager.simpleCheckAndInstall().then(null, () => {});
|
||||||
}, {timeout: 1000 * 60});
|
}, {timeout: 1000 * 60});
|
||||||
|
|
||||||
// Report via telemetry whether we're able to play MP4/H.264/AAC video.
|
|
||||||
// We suspect that some Windows users have a broken or have not installed
|
|
||||||
// Windows Media Foundation, and we'd like to know how many. We'd also like
|
|
||||||
// to know how good our coverage is on other platforms.
|
|
||||||
// Note: we delay by 90 seconds reporting this, as calling canPlayType()
|
|
||||||
// on Windows will cause DLLs to load, i.e. cause disk I/O.
|
|
||||||
setTimeout(() => {
|
|
||||||
let v = document.createElementNS("http://www.w3.org/1999/xhtml", "video");
|
|
||||||
let aacWorks = v.canPlayType("audio/mp4") != "";
|
|
||||||
Services.telemetry.getHistogramById("VIDEO_CAN_CREATE_AAC_DECODER").add(aacWorks);
|
|
||||||
let h264Works = v.canPlayType("video/mp4") != "";
|
|
||||||
Services.telemetry.getHistogramById("VIDEO_CAN_CREATE_H264_DECODER").add(h264Works);
|
|
||||||
}, 90 * 1000);
|
|
||||||
|
|
||||||
SessionStore.promiseInitialized.then(() => {
|
SessionStore.promiseInitialized.then(() => {
|
||||||
// Bail out if the window has been closed in the meantime.
|
// Bail out if the window has been closed in the meantime.
|
||||||
if (window.closed) {
|
if (window.closed) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче