зеркало из https://github.com/mozilla/pjs.git
Bug 561480 - Errors when loading WeaveCrypto.js on older platforms [r=mconnor]
Only register WeaveCrypto if it was able to import scripts.
This commit is contained in:
Родитель
0c62a45494
Коммит
b3b91dc181
|
@ -40,8 +40,11 @@ const Ci = Components.interfaces;
|
|||
const Cr = Components.results;
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
try {
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/ctypes.jsm");
|
||||
}
|
||||
catch(ex) {}
|
||||
|
||||
function WeaveCrypto() {
|
||||
this.init();
|
||||
|
@ -1120,7 +1123,7 @@ WeaveCrypto.prototype = {
|
|||
}
|
||||
};
|
||||
|
||||
let component = [WeaveCrypto];
|
||||
let component = Services == null || ctypes == null ? [] : [WeaveCrypto];
|
||||
function NSGetModule (compMgr, fileSpec) {
|
||||
return XPCOMUtils.generateModule(component);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче