зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1608276 - Part 2: Use ChromeUtils.import instead of Services.scriptloader.loadSubScript in OSCrypto.jsm. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D144080
This commit is contained in:
Родитель
d049dc7b13
Коммит
47530dff67
|
@ -15,13 +15,10 @@ const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||
|
||||
const EXPORTED_SYMBOLS = ["OSCrypto"];
|
||||
|
||||
this.OSCrypto = {};
|
||||
|
||||
if (AppConstants.platform == "win") {
|
||||
Services.scriptloader.loadSubScript(
|
||||
"resource://gre/modules/OSCrypto_win.js",
|
||||
this
|
||||
);
|
||||
} else {
|
||||
if (AppConstants.platform !== "win") {
|
||||
throw new Error("OSCrypto.jsm isn't supported on this platform");
|
||||
}
|
||||
|
||||
const { OSCrypto } = ChromeUtils.import(
|
||||
"resource://gre/modules/OSCrypto_win.jsm"
|
||||
);
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const EXPORTED_SYMBOLS = ["OSCrypto"];
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"ctypes",
|
|
@ -64,7 +64,7 @@ else:
|
|||
|
||||
if CONFIG["OS_TARGET"] == "WINNT":
|
||||
EXTRA_JS_MODULES += [
|
||||
"OSCrypto_win.js",
|
||||
"OSCrypto_win.jsm",
|
||||
]
|
||||
|
||||
if CONFIG["MOZ_BUILD_APP"] == "browser" or CONFIG["MOZ_SUITE"]:
|
||||
|
|
Загрузка…
Ссылка в новой задаче