extensionSystem: Catch import errors
While we catch errors that occur when calling init(), enable() or disable(), the import itself can throw an exception, for instance if the extension imports an unavailable typelib or tries to draw in a conflicting library. https://bugzilla.gnome.org/show_bug.cgi?id=781728
This commit is contained in:
@ -225,7 +225,12 @@ function initExtension(uuid) {
|
||||
let extensionState = null;
|
||||
|
||||
ExtensionUtils.installImporter(extension);
|
||||
extensionModule = extension.imports.extension;
|
||||
try {
|
||||
extensionModule = extension.imports.extension;
|
||||
} catch(e) {
|
||||
logExtensionError(uuid, e);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (extensionModule.init) {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user