[gnome-shell] extensionSystem: Don't load extensions multiple times
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionSystem: Don't load extensions multiple times
- Date: Mon, 18 Oct 2010 19:47:41 +0000 (UTC)
commit 6df48b68fadf38d171b318ebb000548d6371672c
Author: Ray Strode <rstrode redhat com>
Date: Mon Oct 18 11:41:39 2010 -0400
extensionSystem: Don't load extensions multiple times
Right now if XDG_DATA_DIRS is set to have duplicate entries,
then the extension system will try to load all extensions
more than once.
This commit prevents an extension from getting repeatedly
loaded by checking if its uuid is already registered.
https://bugzilla.gnome.org/show_bug.cgi?id=632477
js/ui/extensionSystem.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 944e2e5..5315d90 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -51,6 +51,12 @@ function loadExtension(dir, enabled, type) {
return;
}
}
+
+ if (extensions[meta.uuid] != undefined) {
+ global.logError(baseErrorString + "extension already loaded");
+ return;
+ }
+
// Encourage people to add this
if (!meta['url']) {
global.log(baseErrorString + 'Warning: Missing "url" property in metadata.json');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]