Fixes #134234: Remove __uniqueWebWorkerExtensionHostOrigin option

This commit is contained in:
Alex Dima 2021-11-22 08:18:59 +01:00
parent 05012ac177
commit 3c0f5b2aae
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
2 changed files with 16 additions and 30 deletions

View file

@ -92,30 +92,23 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost
}
const forceHTTPS = (location.protocol === 'https:');
const webEndpointUrlTemplate = this._productService.webEndpointUrlTemplate;
const commit = this._productService.commit;
const quality = this._productService.quality;
if (webEndpointUrlTemplate && commit && quality) {
const baseUrl = (
webEndpointUrlTemplate
.replace('{{uuid}}', generateUuid())
.replace('{{commit}}', commit)
.replace('{{quality}}', quality)
);
const base = (
forceHTTPS
? `${baseUrl}/out/vs/workbench/services/extensions/worker/httpsWebWorkerExtensionHostIframe.html`
: `${baseUrl}/out/vs/workbench/services/extensions/worker/httpWebWorkerExtensionHostIframe.html`
);
let uniqueWebWorkerExtensionHostOrigin = true;
if (this._environmentService.options && typeof this._environmentService.options.__uniqueWebWorkerExtensionHostOrigin !== 'undefined') {
uniqueWebWorkerExtensionHostOrigin = this._environmentService.options.__uniqueWebWorkerExtensionHostOrigin;
}
if (uniqueWebWorkerExtensionHostOrigin) {
const webEndpointUrlTemplate = this._productService.webEndpointUrlTemplate;
const commit = this._productService.commit;
const quality = this._productService.quality;
if (webEndpointUrlTemplate && commit && quality) {
const baseUrl = (
webEndpointUrlTemplate
.replace('{{uuid}}', generateUuid())
.replace('{{commit}}', commit)
.replace('{{quality}}', quality)
);
const base = (
forceHTTPS
? `${baseUrl}/out/vs/workbench/services/extensions/worker/httpsWebWorkerExtensionHostIframe.html`
: `${baseUrl}/out/vs/workbench/services/extensions/worker/httpWebWorkerExtensionHostIframe.html`
);
return base + suffix;
}
return base + suffix;
}
if (this._productService.webEndpointUrl) {

View file

@ -364,13 +364,6 @@ interface IWorkbenchConstructionOptions {
*/
readonly webWorkerExtensionHostIframeSrc?: string;
/**
* [TEMPORARY]: This will be removed soon.
* Use an unique origin for the web worker extension host.
* Defaults to true.
*/
readonly __uniqueWebWorkerExtensionHostOrigin?: boolean;
/**
* A factory for web sockets.
*/