extensionSystem: Store extensions in a Map
After making the extensions map private to the ExtensionManager, we can switch it to a proper hash table which is more appropriate. https://bugzilla.gnome.org/show_bug.cgi?id=789852
This commit is contained in:

committed by
Florian Müllner

parent
1d6ddf060b
commit
43cb3754d9
@ -255,20 +255,20 @@ var GnomeShellExtensions = class {
|
||||
|
||||
ListExtensions() {
|
||||
let out = {};
|
||||
for (let uuid in Main.extensionManager.extensions) {
|
||||
Main.extensionManager.getUuids().forEach(uuid => {
|
||||
let dbusObj = this.GetExtensionInfo(uuid);
|
||||
out[uuid] = dbusObj;
|
||||
}
|
||||
});
|
||||
return out;
|
||||
}
|
||||
|
||||
GetExtensionInfo(uuid) {
|
||||
let extension = Main.extensionManager.extensions[uuid] || {};
|
||||
let extension = Main.extensionManager.lookup(uuid) || {};
|
||||
return ExtensionUtils.serializeExtension(extension);
|
||||
}
|
||||
|
||||
GetExtensionErrors(uuid) {
|
||||
let extension = Main.extensionManager.extensions[uuid];
|
||||
let extension = Main.extensionManager.lookup(uuid);
|
||||
if (!extension)
|
||||
return [];
|
||||
|
||||
@ -304,7 +304,7 @@ var GnomeShellExtensions = class {
|
||||
}
|
||||
|
||||
ReloadExtension(uuid) {
|
||||
let extension = Main.extensionManager.extensions[uuid];
|
||||
let extension = Main.extensionManager.lookup(uuid);
|
||||
if (!extension)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user