Bug 1441531 - Convert waitForMultipleChildrenUpdates from Task.jsm to async/await.
MozReview-Commit-ID: KqZKTSrfhdL
--- a/devtools/client/inspector/test/head.js
+++ b/devtools/client/inspector/test/head.js
@@ -528,23 +528,23 @@ const getHighlighterHelperFor = (type) =
}
};
}
);
// The expand all operation of the markup-view calls itself recursively and
// there's not one event we can wait for to know when it's done so use this
// helper function to wait until all recursive children updates are done.
-function* waitForMultipleChildrenUpdates(inspector) {
+async function waitForMultipleChildrenUpdates(inspector) {
// As long as child updates are queued up while we wait for an update already
// wait again
if (inspector.markup._queuedChildUpdates &&
inspector.markup._queuedChildUpdates.size) {
- yield waitForChildrenUpdated(inspector);
- return yield waitForMultipleChildrenUpdates(inspector);
+ await waitForChildrenUpdated(inspector);
+ return await waitForMultipleChildrenUpdates(inspector);
}
return null;
}
/**
* Using the markupview's _waitForChildren function, wait for all queued
* children updates to be handled.
* @param {InspectorPanel} inspector The instance of InspectorPanel currently