mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-28 00:45:04 +08:00
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:
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;
|
||||
|
||||
Reference in New Issue
Block a user