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 <mathias@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Randolf Jung <jrandolf@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
This commit is contained in:
Mathias Bynens
2022-02-01 10:36:20 +00:00
committed by Devtools-frontend LUCI CQ
parent caaeae230f
commit 02ed46d348
@@ -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;