extensionSystem: handle reloading broken extensions
Some extensions out there may fail to reload. When that happens, we need to catch any exceptions so that we don't leave things in a broken state that could lead to leaving extensions enabled in the screen shield. https://bugzilla.gnome.org/show_bug.cgi?id=781728
This commit is contained in:
parent
123e8c45b0
commit
560e976ee9
@ -276,12 +276,20 @@ function _onVersionValidationChanged() {
|
|||||||
// temporarily disable them all
|
// temporarily disable them all
|
||||||
enabledExtensions = [];
|
enabledExtensions = [];
|
||||||
for (let uuid in ExtensionUtils.extensions)
|
for (let uuid in ExtensionUtils.extensions)
|
||||||
|
try {
|
||||||
reloadExtension(ExtensionUtils.extensions[uuid]);
|
reloadExtension(ExtensionUtils.extensions[uuid]);
|
||||||
|
} catch(e) {
|
||||||
|
logExtensionError(uuid, e);
|
||||||
|
}
|
||||||
enabledExtensions = getEnabledExtensions();
|
enabledExtensions = getEnabledExtensions();
|
||||||
|
|
||||||
if (Main.sessionMode.allowExtensions) {
|
if (Main.sessionMode.allowExtensions) {
|
||||||
enabledExtensions.forEach(function(uuid) {
|
enabledExtensions.forEach(function(uuid) {
|
||||||
|
try {
|
||||||
enableExtension(uuid);
|
enableExtension(uuid);
|
||||||
|
} catch(e) {
|
||||||
|
logExtensionError(uuid, e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user