Enables ContextIsolation
This commit is contained in:
parent
4bbf5eb5d4
commit
9374832ea4
83 changed files with 1009 additions and 1073 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue