[gnome-shell] extensionSystem: Catch import errors
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionSystem: Catch import errors
- Date: Mon, 17 Jul 2017 11:06:30 +0000 (UTC)
commit d461d02cdcc007138f9d39dc7ca7cd62a38e3607
Author: Florian Müllner <fmuellner gnome org>
Date: Wed May 17 23:57:18 2017 +0200
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
js/ui/extensionSystem.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index fc359e6..f25d63a 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -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 {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]