Remove deprecated ways of configuring the web worker extension host iframe src

This commit is contained in:
Alex Dima 2021-12-07 14:09:26 +01:00
parent 5a9e780f0a
commit b2e9a3e2e2
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
3 changed files with 0 additions and 47 deletions

View file

@ -69,7 +69,6 @@ if (args.help) {
' --host Remote host\n' +
' --port Remote/Local port\n' +
' --local_port Local port override\n' +
' --secondary-port Secondary port\n' +
' --extension Path of an extension to include\n' +
' --extensionId Id of an extension to include\n' +
' --open-file uri of the file to open. Also support selections in the file. Eg: scheme://authority/path#L1:2-L10:3\n' +
@ -84,7 +83,6 @@ if (args.help) {
const PORT = args.port || process.env.PORT || 8080;
const LOCAL_PORT = args.local_port || process.env.LOCAL_PORT || PORT;
const SECONDARY_PORT = args['secondary-port'] || (parseInt(PORT, 10) + 1);
const SCHEME = args.scheme || process.env.VSCODE_SCHEME || 'http';
const HOST = args.host || 'localhost';
const AUTHORITY = process.env.VSCODE_AUTHORITY || `${HOST}:${PORT}`;
@ -288,15 +286,6 @@ server.on('error', err => {
console.error(err);
});
const secondaryServer = http.createServer(requestHandler);
secondaryServer.listen(SECONDARY_PORT, () => {
console.log(`Secondary server available at ${SCHEME}://${HOST}:${SECONDARY_PORT}`);
});
secondaryServer.on('error', err => {
console.error(`Error occurred in server:`);
console.error(err);
});
/**
* @param {import('http').IncomingMessage} req
*/
@ -417,11 +406,6 @@ async function handleRoot(req, res) {
fancyLog(`${ansiColors.magenta('Additional extensions')}: ${additionalBuiltinExtensions.map(e => typeof e === 'string' ? e : path.basename(e.path)).join(', ') || 'None'}`);
}
const secondaryHost = (
req.headers['host']
? req.headers['host'].replace(':' + PORT, ':' + SECONDARY_PORT)
: `${HOST}:${SECONDARY_PORT}`
);
const openFileUrl = args['open-file'] ? url.parse(args['open-file'], true) : undefined;
let selection;
if (openFileUrl?.hash) {
@ -436,7 +420,6 @@ async function handleRoot(req, res) {
const webConfigJSON = {
folderUri: folderUri,
additionalBuiltinExtensions,
webWorkerExtensionHostIframeSrc: `${SCHEME}://${secondaryHost}/static/out/vs/workbench/services/extensions/worker/httpWebWorkerExtensionHostIframe.html`,
defaultLayout: openFileUrl ? {
force: true,
editors: [{
@ -455,10 +438,6 @@ async function handleRoot(req, res) {
if (args['wrap-iframe']) {
webConfigJSON._wrapWebWorkerExtHostInIframe = true;
}
if (req.headers['x-forwarded-host']) {
// support for running in codespace => no iframe wrapping
delete webConfigJSON.webWorkerExtensionHostIframeSrc;
}
const authSessionInfo = args['github-auth'] ? {
id: uuid.v4(),

View file

@ -88,10 +88,6 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost
private _webWorkerExtensionHostIframeSrc(): string | null {
const suffix = this._environmentService.debugExtensionHost && this._environmentService.debugRenderer ? '?debugged=1' : '?';
if (this._environmentService.options && this._environmentService.options.webWorkerExtensionHostIframeSrc) {
return this._environmentService.options.webWorkerExtensionHostIframeSrc + suffix;
}
const forceHTTPS = (location.protocol === 'https:');
const webEndpointUrlTemplate = this._productService.webEndpointUrlTemplate;
const commit = this._productService.commit;
@ -112,22 +108,6 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost
return base + suffix;
}
if (this._productService.webEndpointUrl) {
let baseUrl = this._productService.webEndpointUrl;
if (this._productService.quality) {
baseUrl += `/${this._productService.quality}`;
}
if (this._productService.commit) {
baseUrl += `/${this._productService.commit}`;
}
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 null;
}

View file

@ -380,12 +380,6 @@ interface IWorkbenchConstructionOptions {
*/
readonly webviewEndpoint?: string;
/**
* An URL pointing to the web worker extension host <iframe> src.
* @deprecated. This will be removed soon.
*/
readonly webWorkerExtensionHostIframeSrc?: string;
/**
* A factory for web sockets.
*/