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
This commit is contained in:
parent
a7ecc4cdd6
commit
c7b4022283
@ -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_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
|
||||||
const REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
|
const REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
|
||||||
|
|
||||||
const _httpSession = new Soup.SessionAsync({ ssl_use_system_ca_file: true });
|
let _httpSession;
|
||||||
|
|
||||||
// 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());
|
|
||||||
|
|
||||||
// Arrays of uuids
|
// Arrays of uuids
|
||||||
var enabledExtensions;
|
var enabledExtensions;
|
||||||
@ -351,6 +347,11 @@ function onEnabledExtensionsChanged() {
|
|||||||
function init() {
|
function init() {
|
||||||
ExtensionUtils.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);
|
global.settings.connect('changed::' + ENABLED_EXTENSIONS_KEY, onEnabledExtensionsChanged);
|
||||||
enabledExtensions = global.settings.get_strv(ENABLED_EXTENSIONS_KEY);
|
enabledExtensions = global.settings.get_strv(ENABLED_EXTENSIONS_KEY);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user