Archived
1
0

Fix error activating extensions on insecure domains

Doesn't affect Firefox but it does affect other browsers.

Fixes #1136.
This commit is contained in:
Asher 2019-11-04 17:09:25 -06:00
parent 780a673017
commit cee0ac213c
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -812,6 +812,21 @@ index 3bdfa1a79f..ded21cf9c6 100644
// register services that only throw errors
function NotImplementedProxy<T>(name: ServiceIdentifier<T>): { 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