зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1660558 - Handle any exception thrown when trying to load Subprocess due to unsupported platforms. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D87954
This commit is contained in:
Родитель
32685b1f6e
Коммит
2421d68d38
|
@ -22,10 +22,6 @@ const { FeatureGate } = ChromeUtils.import(
|
|||
"resource://featuregates/FeatureGate.jsm"
|
||||
);
|
||||
|
||||
let { Subprocess } = ChromeUtils.import(
|
||||
"resource://gre/modules/Subprocess.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyGlobalGetters(this, ["DOMParser"]);
|
||||
|
||||
// We use a preferences whitelist to make sure we only show preferences that
|
||||
|
@ -441,6 +437,16 @@ var dataProviders = {
|
|||
},
|
||||
|
||||
async environmentVariables(done) {
|
||||
let Subprocess;
|
||||
try {
|
||||
// Subprocess is not available in all builds
|
||||
Subprocess = ChromeUtils.import("resource://gre/modules/Subprocess.jsm")
|
||||
.Subprocess;
|
||||
} catch (ex) {
|
||||
done({});
|
||||
return;
|
||||
}
|
||||
|
||||
let environment = Subprocess.getEnvironment();
|
||||
let filteredEnvironment = {};
|
||||
// Limit the environment variables to those that we
|
||||
|
|
Загрузка…
Ссылка в новой задаче