From 02ed46d348ce8a6cd6342e1829e830f3d55bfc89 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Tue, 1 Feb 2022 10:48:22 +0100 Subject: [PATCH] Clean up redundant Promise.resolve() in HeapProfilerTestRunner Bug: chromium:1161501 Change-Id: I2857d20b536fa4d5abd2afd19551ae6d85f89ee2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3428448 Commit-Queue: Mathias Bynens Auto-Submit: Mathias Bynens Reviewed-by: Randolf Jung Commit-Queue: Randolf Jung --- .../heap_profiler_test_runner/heap_profiler_test_runner.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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;