Skip to content

Commit 20425f6

Browse files
authored
Run batchFinishedCallback on processBatch to catch unhandled rejections by test functions (#3844)
1 parent c623e2b commit 20425f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webgpu/shader/execution/expression/expression.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export async function run(
413413
};
414414
const checkBatch = await submitBatch(t, shaderBuilder, shaderBuilderParams, pipelineCache);
415415
checkBatch();
416-
void t.queue.onSubmittedWorkDone().finally(batchFinishedCallback);
416+
await t.queue.onSubmittedWorkDone();
417417
};
418418

419419
const pendingBatches = [];
@@ -430,7 +430,7 @@ export async function run(
430430
}
431431
batchesInFlight += 1;
432432

433-
pendingBatches.push(processBatch(batchCases));
433+
pendingBatches.push(processBatch(batchCases).finally(batchFinishedCallback));
434434
}
435435

436436
await Promise.all(pendingBatches);

0 commit comments

Comments
 (0)