Enables ContextIsolation

This commit is contained in:
Josh Perez 2023-01-12 19:24:59 -05:00 committed by GitHub
parent 4bbf5eb5d4
commit 9374832ea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 1009 additions and 1073 deletions

View file

@ -9,6 +9,8 @@ type EntryType = Readonly<{
callback(): void;
}>;
let startupProcessingQueue: StartupQueue | undefined;
export class StartupQueue {
private readonly map = new Map<string, EntryType>();
@ -38,4 +40,21 @@ export class StartupQueue {
}
}
}
static initialize(): void {
startupProcessingQueue = new StartupQueue();
}
static isReady(): boolean {
return Boolean(startupProcessingQueue);
}
static add(id: string, value: number, f: () => void): void {
startupProcessingQueue?.add(id, value, f);
}
static flush(): void {
startupProcessingQueue?.flush();
startupProcessingQueue = undefined;
}
}