File gnome-shell-1036494-Consistently-handle-initExtension-errors.patch of Package gnome-shell.openSUSE_Leap_42.3_Update

Index: gnome-shell-3.20.4/js/ui/extensionSystem.js
===================================================================
--- gnome-shell-3.20.4.orig/js/ui/extensionSystem.js
+++ gnome-shell-3.20.4/js/ui/extensionSystem.js
@@ -217,8 +217,10 @@ function initExtension(uuid) {
         throw new Error("Extension was not properly created. Call loadExtension first");
 
     let extensionJs = dir.get_child('extension.js');
-    if (!extensionJs.query_exists(null))
-        throw new Error('Missing extension.js');
+    if (!extensionJs.query_exists(null)) {
+        logExtensionError(uuid, new Error('Missing extension.js'));
+        return false;
+    }
 
     let extensionModule;
     let extensionState = null;
openSUSE Build Service is sponsored by