mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: update trace every time it is loaded (#21323)
This commit is contained in:
parent
3b800344b0
commit
e64d0ae556
@ -37,10 +37,7 @@ const loadedTraces = new Map<string, { traceModel: TraceModel, snapshotServer: S
|
||||
const clientIdToTraceUrls = new MultiMap<string, string>();
|
||||
|
||||
async function loadTrace(traceUrl: string, traceFileName: string | null, clientId: string, progress: (done: number, total: number) => void): Promise<TraceModel> {
|
||||
const entry = loadedTraces.get(traceUrl);
|
||||
clientIdToTraceUrls.set(clientId, traceUrl);
|
||||
if (entry)
|
||||
return entry.traceModel;
|
||||
const traceModel = new TraceModel();
|
||||
try {
|
||||
await traceModel.load(traceUrl, progress);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user