Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-12-SP4:GA
gnome-shell
gnome-shell-1036494-Consistently-handle-createE...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-shell-1036494-Consistently-handle-createExtensionObject-errors.patch of Package gnome-shell
Index: gnome-shell-3.20.4/js/ui/extensionDownloader.js =================================================================== --- gnome-shell-3.20.4.orig/js/ui/extensionDownloader.js +++ gnome-shell-3.20.4/js/ui/extensionDownloader.js @@ -130,12 +130,14 @@ function updateExtension(uuid) { FileUtils.recursivelyMoveDir(extensionDir, oldExtensionTmpDir); FileUtils.recursivelyMoveDir(newExtensionTmpDir, extensionDir); - let extension = ExtensionUtils.createExtensionObject(uuid, extensionDir, ExtensionUtils.ExtensionType.PER_USER); + let extension = null; try { + extension = ExtensionUtils.createExtensionObject(uuid, extensionDir, ExtensionUtils.ExtensionType.PER_USER); ExtensionSystem.loadExtension(extension); } catch(e) { - ExtensionSystem.unloadExtension(extension); + if (extension) + ExtensionSystem.unloadExtension(extension); logError(e, 'Error loading extension %s'.format(uuid)); @@ -242,9 +244,8 @@ const InstallExtensionDialog = new Lang. global.settings.set_strv(ExtensionSystem.ENABLED_EXTENSIONS_KEY, enabledExtensions); } - let extension = ExtensionUtils.createExtensionObject(uuid, dir, ExtensionUtils.ExtensionType.PER_USER); - try { + let extension = ExtensionUtils.createExtensionObject(uuid, dir, ExtensionUtils.ExtensionType.PER_USER); ExtensionSystem.loadExtension(extension); } catch(e) { uninstallExtension(uuid); 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 @@ -198,7 +198,14 @@ function reloadExtension(oldExtension) { unloadExtension(oldExtension); // Now, recreate the extension and load it. - let newExtension = ExtensionUtils.createExtensionObject(uuid, dir, type); + let newExtension; + try { + newExtension = ExtensionUtils.createExtensionObject(uuid, dir, type); + } catch(e) { + logExtensionError(uuid, e); + return; + } + loadExtension(newExtension); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor