[gnome-shell] extensionSystem: Initialize the HTTP session after parse time



commit c7b402228388d469dab2a314eaa0b27c5cf5bc1b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jun 7 23:54:20 2012 -0400

    extensionSystem: Initialize the HTTP session after parse time
    
    We really shouldn't be creating GObjects while we're still parsing other
    files for performance and clarity reasons.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677586

 js/ui/extensionSystem.js |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 70ec5e0..efc79ae 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -34,11 +34,7 @@ const REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
 const REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
 const REPOSITORY_URL_INFO =     REPOSITORY_URL_BASE + '/extension-info/';
 
-const _httpSession = new Soup.SessionAsync({ ssl_use_system_ca_file: true });
-
-// See: https://bugzilla.gnome.org/show_bug.cgi?id=655189 for context.
-// _httpSession.add_feature(new Soup.ProxyResolverDefault());
-Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());
+let _httpSession;
 
 // Arrays of uuids
 var enabledExtensions;
@@ -351,6 +347,11 @@ function onEnabledExtensionsChanged() {
 function init() {
     ExtensionUtils.init();
 
+    _httpSession = new Soup.SessionAsync({ ssl_use_system_ca_file: true });
+    // See: https://bugzilla.gnome.org/show_bug.cgi?id=655189 for context.
+    // _httpSession.add_feature(new Soup.ProxyResolverDefault());
+    Soup.Session.prototype.add_feature.call(_httpSession, new Soup.ProxyResolverDefault());
+
     global.settings.connect('changed::' + ENABLED_EXTENSIONS_KEY, onEnabledExtensionsChanged);
     enabledExtensions = global.settings.get_strv(ENABLED_EXTENSIONS_KEY);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]