extensionSystem: Catch and log session update errors

If sessionUpdated() fails we get a js failure but not information about
where the actual problem was, so catch for error properly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3495>
This commit is contained in:
Marco Trevisan (Treviño)
2024-10-03 17:00:20 +02:00
parent 9b58704c5d
commit 368a685717

View File

@ -43,7 +43,7 @@ export class ExtensionManager extends Signals.EventEmitter {
() => this._reloadExtensionStylesheets());
Main.sessionMode.connect('updated', () => {
this._sessionUpdated();
this._sessionUpdated().catch(logError);
});
}
@ -73,7 +73,7 @@ export class ExtensionManager extends Signals.EventEmitter {
this._installExtensionUpdates();
this._sessionUpdated().then(() => {
ExtensionDownloader.checkForUpdates();
});
}).catch(logError);
GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, UPDATE_CHECK_TIMEOUT, () => {
ExtensionDownloader.checkForUpdates();