Merge from vscode 79a1f5a5ca0c6c53db617aa1fa5a2396d2caebe2

This commit is contained in:
ADS Merger
2020-05-31 19:47:51 +00:00
parent 84492049e8
commit 28be33cfea
913 changed files with 28242 additions and 15549 deletions

View File

@@ -163,9 +163,11 @@ export class CodeWindow extends Disposable implements ICodeWindow {
show: !isFullscreenOrMaximized,
title: product.nameLong,
webPreferences: {
preload: URI.parse(this.doGetPreloadUrl()).fsPath,
nodeIntegration: true,
nodeIntegrationInWorker: RUN_TEXTMATE_IN_WORKER,
webviewTag: true
webviewTag: true,
enableWebSQL: false
}
};
@@ -599,9 +601,12 @@ export class CodeWindow extends Disposable implements ICodeWindow {
}
// Do not set to empty configuration at startup if setting is empty to not override configuration through CLI options:
const env = process.env;
const newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim()
let newHttpProxy = (this.configurationService.getValue<string>('http.proxy') || '').trim()
|| (env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY || '').trim() // Not standardized.
|| undefined;
if (newHttpProxy?.endsWith('/')) {
newHttpProxy = newHttpProxy.substr(0, newHttpProxy.length - 1);
}
const newNoProxy = (env.no_proxy || env.NO_PROXY || '').trim() || undefined; // Not standardized.
if ((newHttpProxy || '').indexOf('@') === -1 && (newHttpProxy !== this.currentHttpProxy || newNoProxy !== this.currentNoProxy)) {
this.currentHttpProxy = newHttpProxy;
@@ -776,6 +781,10 @@ export class CodeWindow extends Disposable implements ICodeWindow {
return `${require.toUrl('vs/code/electron-browser/workbench/workbench.html')}?config=${encodeURIComponent(JSON.stringify(config))}`;
}
private doGetPreloadUrl(): string {
return require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js');
}
serializeWindowState(): IWindowState {
if (!this._win) {
return defaultWindowState();