mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
645ef4e747
Crash reporting for GMPs being used from the EME call site are not generating crash reports because they depend on the MediaKeys object calling GMPService::AddPluginCrashHandler() to associate a window to which the PluginCrashedEvent is fired. This doesn't work with e10s enabled because the GMPParent which causes the plugin crash handlers to run is in the chrome process, but the MediaKeys which adds the handler is in the child process. So the crash handler is on the GMPServiceChild, but we only run the crash handlers that were added to the GMPServiceParent in the chrome/parent process. The solution is to broadcast a message from the chrome process to all the content processes when a GMP has crashed that causes the GMPServiceChild to also run its crash handlers. MozReview-Commit-ID: 8Lek16G9ZGb --HG-- extra : rebase_source : 180691046812df474ea33324d2b98ac71d11c9cd
21 lines
886 B
JavaScript
21 lines
886 B
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
"use strict";
|
|
|
|
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
|
|
|
// Creates a new PageListener for this process. This will listen for page loads
|
|
// and for those that match URLs provided by the parent process will set up
|
|
// a dedicated message port and notify the parent process.
|
|
Cu.import("resource://gre/modules/RemotePageManager.jsm");
|
|
Cu.import("resource://gre/modules/Services.jsm");
|
|
|
|
Services.cpmm.addMessageListener("gmp-plugin-crash", msg => {
|
|
let gmpservice = Cc["@mozilla.org/gecko-media-plugin-service;1"]
|
|
.getService(Ci.mozIGeckoMediaPluginService);
|
|
|
|
gmpservice.RunPluginCrashCallbacks(msg.data.pluginID, msg.data.pluginName);
|
|
});
|