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:
parent
88b1a5d3a0
commit
d461d02cdc
@ -225,7 +225,12 @@ function initExtension(uuid) {
|
|||||||
let extensionState = null;
|
let extensionState = null;
|
||||||
|
|
||||||
ExtensionUtils.installImporter(extension);
|
ExtensionUtils.installImporter(extension);
|
||||||
extensionModule = extension.imports.extension;
|
try {
|
||||||
|
extensionModule = extension.imports.extension;
|
||||||
|
} catch(e) {
|
||||||
|
logExtensionError(uuid, e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (extensionModule.init) {
|
if (extensionModule.init) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user