diff --git a/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js b/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js index 3a8b1e8d77..1a7df3a966 100644 --- a/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +++ b/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js @@ -624,14 +624,13 @@ HeapProfilerTestRunner.takeAndOpenSnapshot = async function(generator, callback) const snapshot = generator(); const profileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotProfileType; - function pushGeneratedSnapshot(reportProgress) { + async function pushGeneratedSnapshot(reportProgress) { if (reportProgress) { profileType.reportHeapSnapshotProgress({data: {done: 50, total: 100, finished: false}}); profileType.reportHeapSnapshotProgress({data: {done: 100, total: 100, finished: true}}); } snapshot.snapshot.typeId = 'HEAP'; profileType.addHeapSnapshotChunk({data: JSON.stringify(snapshot)}); - return Promise.resolve(); } HeapProfilerTestRunner.takeAndOpenSnapshotCallback = callback;