chore: Upgrade to electron 7.x (#83796)

* chore: bump electron@7.0.0

* chore: update api

* chore: Bump electron@7.0.1

* chore: bump electron@7.1.0

* chore: Bump electron@7.1.1

* chore: Bump electron@7.1.2

* FIXME: Skip webview tests that have improper shutdown path

* chore: Bump electron@7.1.3

* bump electron@7.1.5

* debug test failures

* chore: bump electron@7.1.7

* skip test for https://github.com/microsoft/vscode/issues/87330

Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com>
This commit is contained in:
Robo
2020-01-09 19:16:52 +05:30
committed by GitHub
parent cd4472ed5f
commit 4c7431ca8d
13 changed files with 374 additions and 276 deletions

View File

@@ -347,9 +347,9 @@ export class CodeWindow extends Disposable implements ICodeWindow {
});
this._win.webContents.session.webRequest.onHeadersReceived(null!, (details, callback) => {
const responseHeaders = details.responseHeaders as { [key: string]: string[] };
const responseHeaders = details.responseHeaders as Record<string, (string) | (string[])>;
const contentType: string[] = (responseHeaders['content-type'] || responseHeaders['Content-Type']);
const contentType = (responseHeaders['content-type'] || responseHeaders['Content-Type']);
if (contentType && Array.isArray(contentType) && contentType.some(x => x.toLowerCase().indexOf('image/svg') >= 0)) {
return callback({ cancel: true });
}
@@ -441,7 +441,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
// Inject headers when requests are incoming
const urls = ['https://marketplace.visualstudio.com/*', 'https://*.vsassets.io/*'];
this._win.webContents.session.webRequest.onBeforeSendHeaders({ urls }, (details, cb) =>
this.marketplaceHeadersPromise.then(headers => cb({ cancel: false, requestHeaders: objects.assign(details.requestHeaders, headers) as { [key: string]: string | undefined } })));
this.marketplaceHeadersPromise.then(headers => cb({ cancel: false, requestHeaders: objects.assign(details.requestHeaders, headers) as Record<string, string> })));
}
private onWindowError(error: WindowError): void {