Bug 1441528 - Remove duplicated waitForMultipleChildrenUpdates from inspector head files. r=jryans draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 27 Feb 2018 05:22:08 -0800
changeset 760395 690dc9c787b6eceb5d88c1f2f80fc02d90bc4c48
parent 760394 61c52bc5a2cdc3a2c4da887a69ff2c321de2d521
push id100625
push userbmo:poirot.alex@gmail.com
push dateTue, 27 Feb 2018 14:18:07 +0000
reviewersjryans
bugs1441528
milestone60.0a1
Bug 1441528 - Remove duplicated waitForMultipleChildrenUpdates from inspector head files. r=jryans MozReview-Commit-ID: KwUUsWy3IZm
devtools/client/inspector/markup/test/head.js
--- a/devtools/client/inspector/markup/test/head.js
+++ b/devtools/client/inspector/markup/test/head.js
@@ -414,30 +414,16 @@ function checkFocusedAttribute(attrName,
  */
 var getAttributesFromEditor = Task.async(function* (selector, inspector) {
   let nodeList = (yield getContainerForSelector(selector, inspector))
     .tagLine.querySelectorAll("[data-attr]");
 
   return [...nodeList].map(node => node.getAttribute("data-attr"));
 });
 
-// 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) {
-  // 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);
-  }
-  return undefined;
-}
-
 /**
  * Registers new backend tab actor.
  *
  * @param {DebuggerClient} client RDP client object (toolbox.target.client)
  * @param {Object} options Configuration object with the following options:
  *
  * - moduleUrl {String}: URL of the module that contains actor implementation.
  * - prefix {String}: prefix of the actor.