Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > b39af3df513cff36ed5b55267431346a > files > 3

gnome-shell-3.14.3-8.3.mga5.src.rpm

From d461d02cdcc007138f9d39dc7ca7cd62a38e3607 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 17 May 2017 23:57:18 +0200
Subject: 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 file changed, 6 insertions(+), 1 deletion(-)

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 {
-- 
cgit v0.12