From cee0ac213cf80c20537a77b26ea842091b421dc7 Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 4 Nov 2019 17:09:25 -0600 Subject: [PATCH] Fix error activating extensions on insecure domains Doesn't affect Firefox but it does affect other browsers. Fixes #1136. --- scripts/vscode.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/vscode.patch b/scripts/vscode.patch index 1ee8c59c..e04a170d 100644 --- a/scripts/vscode.patch +++ b/scripts/vscode.patch @@ -812,6 +812,21 @@ index 3bdfa1a79f..ded21cf9c6 100644 // register services that only throw errors function NotImplementedProxy(name: ServiceIdentifier): { new(): T } { +diff --git a/src/vs/workbench/services/extensions/worker/extensionHostWorker.ts b/src/vs/workbench/services/extensions/worker/extensionHostWorker.ts +index 3b5706ce76..f390ed35dc 100644 +--- a/src/vs/workbench/services/extensions/worker/extensionHostWorker.ts ++++ b/src/vs/workbench/services/extensions/worker/extensionHostWorker.ts +@@ -36,7 +36,9 @@ const nativeAddEventLister = addEventListener.bind(self); + self.addEventLister = () => console.trace(`'addEventListener' has been blocked`); + + self.indexedDB.open = () => console.trace(`'indexedDB.open' has been blocked`); +-self.caches.open = () => console.trace(`'indexedDB.caches' has been blocked`); ++if (self.caches) { // NOTE@coder: on insecure domains this exists in Firefox but not Chromium or Safari. ++ self.caches.open = () => console.trace(`'indexedDB.caches' has been blocked`); ++} + + //#endregion --- + diff --git a/src/vs/workbench/services/localizations/electron-browser/localizationsService.ts b/src/vs/workbench/services/localizations/electron-browser/localizationsService.ts index 99394090da..4891e0fece 100644 --- a/src/vs/workbench/services/localizations/electron-browser/localizationsService.ts