1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

[PM-8159] [PM-8158] [PM-8156] Swallow multiple offscreen document errors (#9195)

* Swallow multiple offscreen document errors

The API has race issues with determining if an offscreen document exists (https://groups.google.com/a/chromium.org/g/chromium-extensions/c/s2Wp55bjySE/m/SnjJu1MdAAAJ). However, there are no negative effects of attempting to open multiple other than this throw.

* Resolve circular dependency
This commit is contained in:
Matt Gibson
2024-05-15 17:41:04 -04:00
committed by GitHub
parent 4ccf920da8
commit e55e3d5b9b
4 changed files with 33 additions and 13 deletions

View File

@@ -195,9 +195,11 @@ const safeProviders: SafeProvider[] = [
}),
safeProvider({
provide: LogService,
useFactory: (platformUtilsService: PlatformUtilsService) =>
new ConsoleLogService(platformUtilsService.isDev()),
deps: [PlatformUtilsService],
useFactory: () => {
const isDev = process.env.ENV === "development";
return new ConsoleLogService(isDev);
},
deps: [],
}),
safeProvider({
provide: EnvironmentService,
@@ -286,7 +288,7 @@ const safeProviders: SafeProvider[] = [
safeProvider({
provide: OffscreenDocumentService,
useClass: DefaultOffscreenDocumentService,
deps: [],
deps: [LogService],
}),
safeProvider({
provide: PlatformUtilsService,