Skip to content
Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
epozuelo committed Apr 25, 2017
1 parent 9a65f20 commit ff425d1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions js/ui/extensionSystem.js
Expand Up @@ -282,12 +282,20 @@ function _onVersionValidationChanged() {
// temporarily disable them all
enabledExtensions = [];
for (let uuid in ExtensionUtils.extensions)
reloadExtension(ExtensionUtils.extensions[uuid]);
try {
reloadExtension(ExtensionUtils.extensions[uuid]);
} catch(e) {
logExtensionError(uuid, e);
}
enabledExtensions = getEnabledExtensions();

if (Main.sessionMode.allowExtensions) {
enabledExtensions.forEach(function(uuid) {
enableExtension(uuid);
try {
enableExtension(uuid);
} catch(e) {
logExtensionError(uuid, e);
}
});
}
}
Expand Down

0 comments on commit ff425d1

Please sign in to comment.