Backed out 8 changesets (bug 1593170) for causing mass reftest failures. CLOSED TREE
authorArthur Iakab <aiakab@mozilla.com>
Mon, 18 Nov 2019 04:07:19 +0200
changeset 502369 bdca724cf3a248e511fdc87c44f018f6287fa328
parent 502368 2c98625f235b532d925f84e473406ff81e47d02e
child 502370 ffd9d340f30467b02ef2382bde026a573dd4031b
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1593170
milestone72.0a1
backs out2c98625f235b532d925f84e473406ff81e47d02e
39d63ae4d2871837382c0cbfe8ba616f60ed116c
2c8e57a90cb8dbe3763a6d26de0198aba1bcb75e
d511975b764e8f5e97c4511dc39c9aa103e30793
a10072d821e51e633d96a86120595e37a49429c2
80bd8cadf835988a4ea48084d80cf47eb4aa5b24
a004de6493422688953b5b8ea2fc5e1522240f47
78d380a2241afa5c60a90ac8ceca9b3108b99345
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 8 changesets (bug 1593170) for causing mass reftest failures. CLOSED TREE Backed out changeset 2c98625f235b (bug 1593170) Backed out changeset 39d63ae4d287 (bug 1593170) Backed out changeset 2c8e57a90cb8 (bug 1593170) Backed out changeset d511975b764e (bug 1593170) Backed out changeset a10072d821e5 (bug 1593170) Backed out changeset 80bd8cadf835 (bug 1593170) Backed out changeset a004de649342 (bug 1593170) Backed out changeset 78d380a2241a (bug 1593170)
docshell/base/crashtests/crashtests.list
dom/plugins/test/reftest/reftest.list
layout/reftests/bugs/reftest.list
layout/tools/reftest/ReftestFissionChild.jsm
layout/tools/reftest/ReftestFissionParent.jsm
layout/tools/reftest/jar.mn
layout/tools/reftest/reftest-content.js
layout/tools/reftest/reftest.jsm
--- a/docshell/base/crashtests/crashtests.list
+++ b/docshell/base/crashtests/crashtests.list
@@ -7,11 +7,11 @@ load 432114-2.html
 load 436900-1.html
 asserts(0-1) load 436900-2.html # bug 566159
 load 443655.html
 load 500328-1.html
 load 514779-1.xhtml
 load 614499-1.html
 load 678872-1.html
 skip-if(Android) pref(dom.disable_open_during_load,false) load 914521.html # Android bug 1584562
-pref(browser.send_pings,true) asserts(0-2) load 1257730-1.html # bug 566159
+pref(browser.send_pings,true) load 1257730-1.html
 load 1331295.html
 load 1341657.html
--- a/dom/plugins/test/reftest/reftest.list
+++ b/dom/plugins/test/reftest/reftest.list
@@ -10,17 +10,17 @@ fuzzy(0-16,0-256) random-if(/^Windows\x2
 fuzzy(0-16,0-256) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin||Android) HTTP == border-padding-3.html border-padding-3-ref.html # bug 629430 # bug 773482
 # The following two "pluginproblemui-direction" tests are unreliable on all platforms. They should be re-written or replaced.
 #random-if(cocoaWidget||d2d||/^Windows\x20NT\x205\.1/.test(http.oscpu)) fails-if(!haveTestPlugin&&!Android) HTTP == pluginproblemui-direction-1.html pluginproblemui-direction-1-ref.html # bug 567367
 #random-if(cocoaWidget) fails-if(!haveTestPlugin&&!Android) HTTP == pluginproblemui-direction-2.html pluginproblemui-direction-2-ref.html
 fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-160000) HTTP == plugin-canvas-alpha-zindex.html div-alpha-zindex.html
 fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-160000) HTTP == plugin-transform-alpha-zindex.html div-alpha-zindex.html
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-160000) HTTP == plugin-busy-alpha-zindex.html div-alpha-zindex.html
 random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background.html plugin-background-ref.html
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-1-step.html plugin-background-ref.html
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-2-step.html plugin-background-ref.html
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-5-step.html plugin-background-ref.html
-random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) skip-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-10-step.html plugin-background-ref.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-1-step.html plugin-background-ref.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-2-step.html plugin-background-ref.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-5-step.html plugin-background-ref.html
+random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) fuzzy-if(skiaContent&&haveTestPlugin,0-1,0-32400) HTTP == plugin-background-10-step.html plugin-background-ref.html
 random-if(!haveTestPlugin) HTTP == plugin-transform-1.html plugin-transform-1-ref.html
 fails-if(!haveTestPlugin) HTTP == plugin-transform-2.html plugin-transform-2-ref.html
 skip-if(!haveTestPlugin) HTTP == shrink-1.html shrink-1-ref.html
 pref(dom.mozPaintCount.enabled,true) skip-if(!haveTestPlugin) HTTP == update-1.html update-1-ref.html
 skip-if(!haveTestPlugin) HTTP == windowless-layers.html windowless-layers-ref.html
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -2071,17 +2071,17 @@ fuzzy-if(winWidget&&!webrender,0-89,0-14
 fuzzy-if(!webrender,1-5,66-547) fuzzy-if(geckoview&&!webrender,1-2,64-141) == 1529992-1.html 1529992-1-ref.html
 fuzzy-if(!webrender,0-6,0-34) fuzzy-if(Android,9-14,44-60) fails-if(webrender) == 1529992-2.html 1529992-2-ref.html
 == 1535040-1.html 1535040-1-ref.html
 == 1545360-1.xhtml 1545360-1-ref.xhtml
 skip-if(!asyncPan) == 1544895.html 1544895-ref.html
 == 1547759-1.html 1547759-1-ref.html
 == 1548809.html 1548809-ref.html
 != 1552789-1.html 1552789-ref-1.html
-pref(image.downscale-during-decode.enabled,true) skip-if(Android&&webrender) == 1553571-1.html 1553571-1-ref.html
+pref(image.downscale-during-decode.enabled,true) == 1553571-1.html 1553571-1-ref.html
 == 1558937-1.html 1558937-1-ref.html
 != 1563484.html 1563484-notref.html
 == 1563484.html 1563484-ref.html
 fuzzy-if(!webrender||!winWidget,251-255,464-1613) fuzzy-if(webrender&&winWidget,255-255,6-6) fuzzy-if(geckoview&&webrender,251-255,1392-1401) == 1562733-rotated-nastaliq-1.html 1562733-rotated-nastaliq-1-ref.html
 fuzzy-if(winWidget&&webrender,0-31,0-3) fuzzy-if(geckoview&&webrender,0-93,0-87) == 1562733-rotated-nastaliq-2.html 1562733-rotated-nastaliq-2-ref.html
 test-pref(plain_text.wrap_long_lines,false) != 1565129.txt 1565129.txt
 fuzzy(0-32,0-8) fuzzy-if(Android&&webrender,0-32,0-1458) == 1576553-1.html 1576553-1-ref.html
 fuzzy(0-1,0-10000) == 1577566-1.html 1577566-1-ref.html
deleted file mode 100644
--- a/layout/tools/reftest/ReftestFissionChild.jsm
+++ /dev/null
@@ -1,75 +0,0 @@
-var EXPORTED_SYMBOLS = ["ReftestFissionChild"];
-
-class ReftestFissionChild extends JSWindowActorChild {
-
-  receiveMessage(msg) {
-    switch (msg.name) {
-      case "UpdateLayerTree":
-        let errorString = null;
-        try {
-          if (this.manager.isProcessRoot) {
-            this.contentWindow.windowUtils.updateLayerTree();
-          }
-        } catch (e) {
-          errorString = "updateLayerTree failed: " + e;
-        }
-        return Promise.resolve({errorString});
-      case "FlushRendering":
-        let errorStrings = [];
-        let warningStrings = [];
-        let infoStrings = [];
-
-        try {
-          let ignoreThrottledAnimations = msg.data.ignoreThrottledAnimations;
-
-          if (this.manager.isProcessRoot) {
-            var anyPendingPaintsGeneratedInDescendants = false;
-
-            function flushWindow(win) {
-              var utils = win.windowUtils;
-              var afterPaintWasPending = utils.isMozAfterPaintPending;
-
-              var root = win.document.documentElement;
-              if (root && !root.classList.contains("reftest-no-flush")) {
-                try {
-                  if (ignoreThrottledAnimations) {
-                    utils.flushLayoutWithoutThrottledAnimations();
-                  } else {
-                    root.getBoundingClientRect();
-                  }
-                } catch (e) {
-                  warningStrings.push("flushWindow failed: " + e + "\n")
-                }
-              }
-
-              if (!afterPaintWasPending && utils.isMozAfterPaintPending) {
-                infoStrings.push("FlushRendering generated paint for window " + win.location.href)
-                anyPendingPaintsGeneratedInDescendants = true;
-              }
-
-              for (let i = 0; i < win.frames.length; ++i) {
-                try {
-                  if (!Cu.isRemoteProxy(win.frames[i])) {
-                    flushWindow(win.frames[i]);
-                  }
-                } catch (e) {
-                  Cu.reportError(e);
-                }
-              }
-            }
-
-            flushWindow(this.contentWindow);
-
-            if (anyPendingPaintsGeneratedInDescendants &&
-                !this.contentWindow.windowUtils.isMozAfterPaintPending) {
-              warningStrings.push("Internal error: descendant frame generated a MozAfterPaint event, but the root document doesn't have one!");
-            }
-
-          }
-        } catch (e) {
-          errorStrings.push("flushWindow failed: " + e);
-        }
-        return Promise.resolve({errorStrings, warningStrings, infoStrings});
-    }
-  }
-}
deleted file mode 100644
--- a/layout/tools/reftest/ReftestFissionParent.jsm
+++ /dev/null
@@ -1,102 +0,0 @@
-var EXPORTED_SYMBOLS = ["ReftestFissionParent"];
-
-class ReftestFissionParent extends JSWindowActorParent {
-
-  tellChildrenToFlushRendering(browsingContext, ignoreThrottledAnimations) {
-    let promises = [];
-    this.tellChildrenToFlushRenderingRecursive(browsingContext, ignoreThrottledAnimations, promises);
-    return Promise.allSettled(promises);
-  }
-
-  tellChildrenToFlushRenderingRecursive(browsingContext, ignoreThrottledAnimations, promises) {
-    let cwg = browsingContext.currentWindowGlobal;
-    if (cwg && cwg.isProcessRoot) {
-      let a = cwg.getActor("ReftestFission");
-      if (a) {
-        let responsePromise = a.sendQuery("FlushRendering", {ignoreThrottledAnimations});
-        promises.push(responsePromise);
-      }
-    }
-
-    for (let context of browsingContext.getChildren()) {
-      this.tellChildrenToFlushRenderingRecursive(context, ignoreThrottledAnimations, promises);
-    }
-  }
-
-  tellChildrenToUpdateLayerTree(browsingContext) {
-    let promises = [];
-    this.tellChildrenToUpdateLayerTreeRecursive(browsingContext, promises);
-    return Promise.allSettled(promises);
-  }
-
-  tellChildrenToUpdateLayerTreeRecursive(browsingContext, promises) {
-    let cwg = browsingContext.currentWindowGlobal;
-    if (cwg && cwg.isProcessRoot) {
-      let a = cwg.getActor("ReftestFission");
-      if (a) {
-        let responsePromise = a.sendQuery("UpdateLayerTree");
-        promises.push(responsePromise);
-      }
-    }
-
-    for (let context of browsingContext.getChildren()) {
-      this.tellChildrenToUpdateLayerTreeRecursive(context, promises);
-    }
-  }
-
-  receiveMessage(msg) {
-    switch (msg.name) {
-      case "FlushRendering":
-      {
-        let promise = this.tellChildrenToFlushRendering(msg.data.browsingContext, msg.data.ignoreThrottledAnimations);
-        return promise.then(function (results) {
-          let errorStrings = [];
-          let warningStrings = [];
-          let infoStrings = [];
-          for (let r of results) {
-            if (r.status != "fulfilled") {
-              if (r.status == "pending") {
-                errorStrings.push("FlushRendering sendQuery to child promise still pending?");
-              } else {
-                // We expect actors to go away causing sendQuery's to fail, so
-                // just note it.
-                infoStrings.push("FlushRendering sendQuery to child promise rejected: " + r.reason);
-              }
-              continue;
-            }
-
-            errorStrings.concat(r.value.errorStrings);
-            warningStrings.concat(r.value.warningStrings);
-            infoStrings.concat(r.value.infoStrings);
-          }
-          return {errorStrings, warningStrings, infoStrings};
-        });
-      }
-      case "UpdateLayerTree":
-      {
-        let promise = this.tellChildrenToUpdateLayerTree(msg.data.browsingContext);
-        return promise.then(function (results) {
-          let errorStrings = [];
-          for (let r of results) {
-            if (r.status != "fulfilled") {
-              if (r.status == "pending") {
-                errorStrings.push("UpdateLayerTree sendQuery to child promise still pending?");
-              } else {
-                // We expect actors to go away causing sendQuery's to fail, so
-                // just note it.
-                infoStrings.push("UpdateLayerTree sendQuery to child promise rejected: " + r.reason);
-              }
-              continue;
-            }
-
-            if (r.value.errorString != null) {
-              errorStrings.push(r.value.errorString);
-            }
-          }
-          return errorStrings;
-        });
-      }
-    }
-  }
-
-}
--- a/layout/tools/reftest/jar.mn
+++ b/layout/tools/reftest/jar.mn
@@ -43,18 +43,16 @@ reftest.jar:
   content/crashtests/layout/style/crashtests (../../../layout/style/crashtests/*)
   content/crashtests/gfx/tests/crashtests (../../../gfx/tests/crashtests/*)
   content/crashtests/accessible/tests/crashtests (../../../accessible/tests/crashtests/*)
   content/crashtests/view/crashtests (../../../view/crashtests/*)
   content/crashtests/widget/cocoa/crashtests (../../../widget/cocoa/crashtests/*)
 
   res/globals.jsm (globals.jsm)
   res/reftest-content.js (reftest-content.js)
-  res/ReftestFissionParent.jsm (ReftestFissionParent.jsm)
-  res/ReftestFissionChild.jsm (ReftestFissionChild.jsm)
   res/AsyncSpellCheckTestHelper.jsm (../../../editor/AsyncSpellCheckTestHelper.jsm)
   res/httpd.jsm (../../../netwerk/test/httpserver/httpd.js)
   res/StructuredLog.jsm (../../../testing/modules/StructuredLog.jsm)
   res/PerTestCoverageUtils.jsm (../../../tools/code-coverage/PerTestCoverageUtils.jsm)
   res/input.css (../../../editor/reftests/xul/input.css)
   res/progress.css (../../../layout/reftests/forms/progress/style.css)
 *  res/manifest.jsm (manifest.jsm)
 *  res/reftest.jsm (reftest.jsm)
--- a/layout/tools/reftest/reftest-content.js
+++ b/layout/tools/reftest/reftest-content.js
@@ -504,224 +504,96 @@ const STATE_WAITING_FOR_SPELL_CHECKS = 2
 // move to the next state.
 const STATE_WAITING_FOR_APZ_FLUSH = 3;
 // When all MozAfterPaint events and all explicit paint waits are flushed, we're
 // done and can move to the COMPLETED state.
 const STATE_WAITING_TO_FINISH = 4;
 const STATE_COMPLETED = 5;
 
 function FlushRendering(aFlushMode) {
-    let browsingContext = content.docShell.browsingContext;
-    let ignoreThrottledAnimations = (aFlushMode === FlushMode.IGNORE_THROTTLED_ANIMATIONS);
-    let promise = content.getWindowGlobalChild().getActor("ReftestFission").sendQuery("FlushRendering", {browsingContext, ignoreThrottledAnimations});
-    return promise.then(function(result) {
-        for (let errorString of result.errorStrings) {
-            LogError(errorString);
-        }
-        for (let warningString of result.warningStrings) {
-            LogWarning(warningString);
-        }
-        for (let infoString of result.infoStrings) {
-            LogInfo(infoString);
-        }
-    }, function(reason) {
-        // We expect actors to go away causing sendQuery's to fail, so
-        // just note it.
-        LogInfo("FlushRendering sendQuery to parent rejected: " + reason);
-    });
-}
+    var anyPendingPaintsGeneratedInDescendants = false;
+
+    function flushWindow(win) {
+        var utils = win.windowUtils;
+        var afterPaintWasPending = utils.isMozAfterPaintPending;
 
-function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements, forURL) {
-    // WaitForTestEnd works via the MakeProgress function below. It is responsible for
-    // moving through the states listed above and calling FlushRendering. We also listen
-    // for a number of events, the most important of which is the AfterPaintListener,
-    // which is responsible for updating the canvas after paints. In a fission world
-    // FlushRendering and updating the canvas must necessarily be async operations.
-    // During these async operations we want to wait for them to finish and we don't
-    // want to try to do anything else (what would we even want to do while only some of
-    // the processes involved have flushed layout or updated their layer trees?). So
-    // we call OperationInProgress whenever we are about to go back to the event loop
-    // during one of these calls, and OperationCompleted when it finishes. This prevents
-    // anything else from running while we wait and getting us into a confused state. We
-    // then record anything that happens while we are waiting to make sure that the
-    // right actions are triggered. The possible actions are basically calling
-    // MakeProgress from a setTimeout, and updating the canvas for an after paint event.
-    // The after paint listener just stashes the rects and we update them after a
-    // completed MakeProgress call. This is handled by
-    // HandlePendingTasksAfterMakeProgress, which also waits for any pending after paint
-    // events. The general sequence of events is:
-    //   - MakeProgress
-    //   - HandlePendingTasksAfterMakeProgress
-    //     - wait for after paint event if one is pending
-    //     - update canvas for after paint events we have received
-    //   - MakeProgress
-    //   etc
+        var root = win.document.documentElement;
+        if (root && !root.classList.contains("reftest-no-flush")) {
+            try {
+                if (aFlushMode === FlushMode.IGNORE_THROTTLED_ANIMATIONS) {
+                    utils.flushLayoutWithoutThrottledAnimations();
+                } else {
+                    root.getBoundingClientRect();
+                }
+            } catch (e) {
+                LogWarning("flushWindow failed: " + e + "\n");
+            }
+        }
 
-    function CheckForLivenessOfContentRootElement() {
-        if (contentRootElement && Cu.isDeadWrapper(contentRootElement)) {
-            contentRootElement = null;
+        if (!afterPaintWasPending && utils.isMozAfterPaintPending) {
+            LogInfo("FlushRendering generated paint for window " + win.location.href);
+            anyPendingPaintsGeneratedInDescendants = true;
+        }
+
+        for (var i = 0; i < win.frames.length; ++i) {
+            try {
+                flushWindow(win.frames[i]);
+            } catch (e) {
+                Cu.reportError(e);
+            }
         }
     }
 
-    var setTimeoutCallMakeProgressWhenComplete = false;
+    flushWindow(content);
 
-    var operationInProgress = false;
-    function OperationInProgress() {
-        if (operationInProgress != false) {
-            LogWarning("Nesting atomic operations?");
-        }
-        operationInProgress = true;
+    if (anyPendingPaintsGeneratedInDescendants &&
+        !windowUtils().isMozAfterPaintPending) {
+        LogWarning("Internal error: descendant frame generated a MozAfterPaint event, but the root document doesn't have one!");
     }
-    function OperationCompleted() {
-        if (operationInProgress != true) {
-            LogWarning("Mismatched OperationInProgress/OperationCompleted calls?");
-        }
-        operationInProgress = false;
-        if (setTimeoutCallMakeProgressWhenComplete) {
-            setTimeoutCallMakeProgressWhenComplete = false;
-            setTimeout(CallMakeProgress, 0);
-        }
-    }
-    function AssertNoOperationInProgress() {
-        if (operationInProgress) {
-            LogWarning("AssertNoOperationInProgress but operationInProgress");
-        }
-    }
+}
 
-    var updateCanvasPending = false;
-    var updateCanvasRects = []
-
+function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements, forURL) {
     var stopAfterPaintReceived = false;
     var currentDoc = content.document;
     var state = STATE_WAITING_TO_FIRE_INVALIDATE_EVENT;
 
-    var setTimeoutMakeProgressPending = false;
-
-    function CallSetTimeoutMakeProgress() {
-        if (setTimeoutMakeProgressPending) {
-            return;
-        }
-        setTimeoutMakeProgressPending = true;
-        setTimeout(CallMakeProgress, 0);
-    }
-
-    // This should only ever be called from a timeout.
-    function CallMakeProgress() {
-        if (operationInProgress) {
-            setTimeoutCallMakeProgressWhenComplete = true;
-            return;
-        }
-        setTimeoutMakeProgressPending = false;
-        MakeProgress();
-    }
-
-    var waitingForAnAfterPaint = false;
-
-    // Updates the canvas if there are pending updates for it. Checks if we
-    // need to call MakeProgress.
-    function HandlePendingTasksAfterMakeProgress() {
-        AssertNoOperationInProgress();
-
-        if ((state == STATE_WAITING_TO_FIRE_INVALIDATE_EVENT || state == STATE_WAITING_TO_FINISH) &&
-            shouldWaitForPendingPaints()) {
-            LogInfo("HandlePendingTasksAfterMakeProgress waiting for a MozAfterPaint");
-            // We are in a state where we wait for MozAfterPaint to clear and a
-            // MozAfterPaint event is pending, give it a chance to fire, but don't
-            // let anything else run.
-            waitingForAnAfterPaint = true;
-            OperationInProgress();
-            return;
-        }
-
-        if (updateCanvasPending) {
-            LogInfo("HandlePendingTasksAfterMakeProgress updating canvas");
-            updateCanvasPending = false;
-            let rects = updateCanvasRects;
-            updateCanvasRects = [];
-            OperationInProgress();
-            CheckForLivenessOfContentRootElement
-            let promise = SendUpdateCanvasForEvent(rects, contentRootElement);
-            promise.then(function () {
-                OperationCompleted();
-                // After paint events are fired immediately after a paint (one
-                // of the things that can call us). Don't confuse ourselves by
-                // firing synchronously if we triggered the paint ourselves.
-                CallSetTimeoutMakeProgress();
-            });
-        }
-    }
-
     function AfterPaintListener(event) {
         LogInfo("AfterPaintListener in " + event.target.document.location.href);
         if (event.target.document != currentDoc) {
             // ignore paint events for subframes or old documents in the window.
             // Invalidation in subframes will cause invalidation in the toplevel document anyway.
             return;
         }
 
-        // true if rectA contains rectB
-        function Contains(rectA, rectB) {
-            return (rectA.left <= rectB.left && rectB.right <= rectA.right && rectA.top <= rectB.top && rectB.bottom <= rectA.bottom);
-        }
-        // true if some rect in rectList contains rect
-        function ContainedIn(rectList, rect) {
-            for (let i = 0; i < rectList.length; ++i) {
-                if (Contains(rectList[i], rect)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        updateCanvasPending = true;
-        for (let i = 0; i < event.clientRects.length; ++i) {
-            let r = event.clientRects[i];
-            if (ContainedIn(updateCanvasRects, r)) {
-                continue;
-            }
-
-            // Copy the rect; it's content and we are chrome, which means if the
-            // document goes away (and it can in some crashtests) our reference
-            // to it will be turned into a dead wrapper that we can't acccess.
-            updateCanvasRects.push({ left: r.left, top: r.top, right: r.right, bottom: r.bottom });
-        }
-
-        if (waitingForAnAfterPaint) {
-            waitingForAnAfterPaint = false;
-            OperationCompleted();
-        }
-
-        if (!operationInProgress) {
-            HandlePendingTasksAfterMakeProgress();
-        }
-        // Otherwise we know that eventually after the operation finishes we
-        // will get a MakeProgress and/or HandlePendingTasksAfterMakeProgress
-        // call, so we don't need to do anything.
+        SendUpdateCanvasForEvent(forURL, event, contentRootElement);
+        // These events are fired immediately after a paint. Don't
+        // confuse ourselves by firing synchronously if we triggered the
+        // paint ourselves.
+        setTimeout(MakeProgress, 0);
     }
 
     function AttrModifiedListener() {
         LogInfo("AttrModifiedListener fired");
         // Wait for the next return-to-event-loop before continuing --- for
         // example, the attribute may have been modified in an subdocument's
         // load event handler, in which case we need load event processing
         // to complete and unsuppress painting before we check isMozAfterPaintPending.
-        CallSetTimeoutMakeProgress();
+        setTimeout(MakeProgress, 0);
     }
 
     function ExplicitPaintsCompleteListener() {
         LogInfo("ExplicitPaintsCompleteListener fired");
         // Since this can fire while painting, don't confuse ourselves by
         // firing synchronously. It's fine to do this asynchronously.
-        CallSetTimeoutMakeProgress();
+        setTimeout(MakeProgress, 0);
     }
 
     function RemoveListeners() {
         // OK, we can end the test now.
         removeEventListener("MozAfterPaint", AfterPaintListener, false);
-        CheckForLivenessOfContentRootElement();
         if (contentRootElement) {
             contentRootElement.removeEventListener("DOMAttrModified", AttrModifiedListener);
         }
         gExplicitPendingPaintsCompleteHook = null;
         gTimeoutHook = null;
         // Make sure we're in the COMPLETED state just in case
         // (this may be called via the test-timeout hook)
         state = STATE_COMPLETED;
@@ -731,70 +603,49 @@ function WaitForTestEnd(contentRootEleme
     // change from returning true to returning false is monitored via some kind
     // of event listener which eventually calls this function.
     function MakeProgress() {
         if (state >= STATE_COMPLETED) {
             LogInfo("MakeProgress: STATE_COMPLETED");
             return;
         }
 
-        LogInfo("MakeProgress");
-
         // We don't need to flush styles any more when we are in the state
         // after reftest-wait has removed.
-        OperationInProgress();
-        let promise = Promise.resolve(undefined);
         if (state != STATE_WAITING_TO_FINISH) {
           // If we are waiting for the MozReftestInvalidate event we don't want
           // to flush throttled animations. Flushing throttled animations can
           // continue to cause new MozAfterPaint events even when all the
           // rendering we're concerned about should have ceased. Since
           // MozReftestInvalidate won't be sent until we finish waiting for all
           // MozAfterPaint events, we should avoid flushing throttled animations
           // here or else we'll never leave this state.
           flushMode = (state === STATE_WAITING_TO_FIRE_INVALIDATE_EVENT)
                     ? FlushMode.IGNORE_THROTTLED_ANIMATIONS
                     : FlushMode.ALL;
-          promise = FlushRendering(flushMode);
+          FlushRendering(flushMode);
         }
-        promise.then(function () {
-            OperationCompleted();
-            MakeProgress2();
-            // If there is an operation in progress then we know there will be
-            // a MakeProgress call is will happen after it finishes.
-            if (!operationInProgress) {
-                HandlePendingTasksAfterMakeProgress();
-            }
-        });
-    }
 
-    function MakeProgress2() {
         switch (state) {
         case STATE_WAITING_TO_FIRE_INVALIDATE_EVENT: {
             LogInfo("MakeProgress: STATE_WAITING_TO_FIRE_INVALIDATE_EVENT");
-            if (shouldWaitForExplicitPaintWaiters() || shouldWaitForPendingPaints() ||
-                updateCanvasPending) {
+            if (shouldWaitForExplicitPaintWaiters() || shouldWaitForPendingPaints()) {
                 gFailureReason = "timed out waiting for pending paint count to reach zero";
                 if (shouldWaitForExplicitPaintWaiters()) {
                     gFailureReason += " (waiting for MozPaintWaitFinished)";
                     LogInfo("MakeProgress: waiting for MozPaintWaitFinished");
                 }
                 if (shouldWaitForPendingPaints()) {
                     gFailureReason += " (waiting for MozAfterPaint)";
                     LogInfo("MakeProgress: waiting for MozAfterPaint");
                 }
-                if (updateCanvasPending) {
-                    gFailureReason += " (waiting for updateCanvasPending)";
-                    LogInfo("MakeProgress: waiting for updateCanvasPending");
-                }
                 return;
             }
 
             state = STATE_WAITING_FOR_REFTEST_WAIT_REMOVAL;
-            CheckForLivenessOfContentRootElement();
             var hasReftestWait = shouldWaitForReftestWaitRemoval(contentRootElement);
             // Notify the test document that now is a good time to test some invalidation
             LogInfo("MakeProgress: dispatching MozReftestInvalidate");
             if (contentRootElement) {
                 var elements = getNoPaintElements(contentRootElement);
                 for (var i = 0; i < elements.length; ++i) {
                   windowUtils().checkAndClearPaintedState(elements[i]);
                 }
@@ -814,36 +665,28 @@ function WaitForTestEnd(contentRootEleme
             if (!inPrintMode && doPrintMode(contentRootElement)) {
                 LogInfo("MakeProgress: setting up print mode");
                 setupPrintMode();
             }
 
             if (hasReftestWait && !shouldWaitForReftestWaitRemoval(contentRootElement)) {
                 // MozReftestInvalidate handler removed reftest-wait.
                 // We expect something to have been invalidated...
-                OperationInProgress();
-                let promise = FlushRendering(FlushMode.ALL);
-                promise.then(function () {
-                    OperationCompleted();
-                    if (!updateCanvasPending && !shouldWaitForPendingPaints() &&
-                        !shouldWaitForExplicitPaintWaiters()) {
-                        LogWarning("MozInvalidateEvent didn't invalidate");
-                    }
-                    MakeProgress();
-                });
-                return;
+                FlushRendering(FlushMode.ALL);
+                if (!shouldWaitForPendingPaints() && !shouldWaitForExplicitPaintWaiters()) {
+                    LogWarning("MozInvalidateEvent didn't invalidate");
+                }
             }
             // Try next state
             MakeProgress();
             return;
         }
 
         case STATE_WAITING_FOR_REFTEST_WAIT_REMOVAL:
             LogInfo("MakeProgress: STATE_WAITING_FOR_REFTEST_WAIT_REMOVAL");
-            CheckForLivenessOfContentRootElement();
             if (shouldWaitForReftestWaitRemoval(contentRootElement)) {
                 gFailureReason = "timed out waiting for reftest-wait to be removed";
                 LogInfo("MakeProgress: waiting for reftest-wait to be removed");
                 return;
             }
 
             // Try next state
             state = STATE_WAITING_FOR_SPELL_CHECKS;
@@ -862,26 +705,21 @@ function WaitForTestEnd(contentRootEleme
             LogInfo("MakeProgress: STATE_WAITING_FOR_APZ_FLUSH");
             gFailureReason = "timed out waiting for APZ flush to complete";
 
             var os = Cc[NS_OBSERVER_SERVICE_CONTRACTID].getService(Ci.nsIObserverService);
             var flushWaiter = function(aSubject, aTopic, aData) {
                 if (aTopic) LogInfo("MakeProgress: apz-repaints-flushed fired");
                 os.removeObserver(flushWaiter, "apz-repaints-flushed");
                 state = STATE_WAITING_TO_FINISH;
-                if (operationInProgress) {
-                    CallSetTimeoutMakeProgress();
-                } else {
-                    MakeProgress();
-                }
+                MakeProgress();
             };
             os.addObserver(flushWaiter, "apz-repaints-flushed");
 
             var willSnapshot = IsSnapshottableTestType();
-            CheckForLivenessOfContentRootElement();
             var noFlush =
                 !(contentRootElement &&
                   contentRootElement.classList.contains("reftest-no-flush"));
             if (noFlush && willSnapshot && windowUtils().flushApzRepaints()) {
                 LogInfo("MakeProgress: done requesting APZ flush");
             } else {
                 LogInfo("MakeProgress: APZ flush not required");
                 flushWaiter(null, null, null);
@@ -891,35 +729,29 @@ function WaitForTestEnd(contentRootEleme
         case STATE_WAITING_FOR_APZ_FLUSH:
             LogInfo("MakeProgress: STATE_WAITING_FOR_APZ_FLUSH");
             // Nothing to do here; once we get the apz-repaints-flushed event
             // we will go to STATE_WAITING_TO_FINISH
             return;
 
         case STATE_WAITING_TO_FINISH:
             LogInfo("MakeProgress: STATE_WAITING_TO_FINISH");
-            if (shouldWaitForExplicitPaintWaiters() || shouldWaitForPendingPaints() ||
-                updateCanvasPending) {
+            if (shouldWaitForExplicitPaintWaiters() || shouldWaitForPendingPaints()) {
                 gFailureReason = "timed out waiting for pending paint count to " +
                     "reach zero (after reftest-wait removed and switch to print mode)";
                 if (shouldWaitForExplicitPaintWaiters()) {
                     gFailureReason += " (waiting for MozPaintWaitFinished)";
                     LogInfo("MakeProgress: waiting for MozPaintWaitFinished");
                 }
                 if (shouldWaitForPendingPaints()) {
                     gFailureReason += " (waiting for MozAfterPaint)";
                     LogInfo("MakeProgress: waiting for MozAfterPaint");
                 }
-                if (updateCanvasPending) {
-                    gFailureReason += " (waiting for updateCanvasPending)";
-                    LogInfo("MakeProgress: waiting for updateCanvasPending");
-                }
                 return;
             }
-            CheckForLivenessOfContentRootElement();
             if (contentRootElement) {
               var elements = getNoPaintElements(contentRootElement);
               for (var i = 0; i < elements.length; ++i) {
                   if (windowUtils().checkAndClearPaintedState(elements[i])) {
                       SendFailedNoPaint();
                   }
               }
               // We only support retained display lists in the content process
@@ -951,62 +783,52 @@ function WaitForTestEnd(contentRootEleme
               gFailureReason = "timed out while waiting for sync compositor flush"
               windowUtils().syncFlushCompositor();
             }
 
             LogInfo("MakeProgress: Completed");
             state = STATE_COMPLETED;
             gFailureReason = "timed out while taking snapshot (bug in harness?)";
             RemoveListeners();
-            CheckForLivenessOfContentRootElement();
             CheckForProcessCrashExpectation(contentRootElement);
             setTimeout(RecordResult, 0, forURL);
             return;
         }
     }
 
     LogInfo("WaitForTestEnd: Adding listeners");
     addEventListener("MozAfterPaint", AfterPaintListener, false);
     // If contentRootElement is null then shouldWaitForReftestWaitRemoval will
     // always return false so we don't need a listener anyway
-    CheckForLivenessOfContentRootElement();
     if (contentRootElement) {
       contentRootElement.addEventListener("DOMAttrModified", AttrModifiedListener);
     }
     gExplicitPendingPaintsCompleteHook = ExplicitPaintsCompleteListener;
     gTimeoutHook = RemoveListeners;
 
     // Listen for spell checks on spell-checked elements.
     var numPendingSpellChecks = spellCheckedElements.length;
     function decNumPendingSpellChecks() {
         --numPendingSpellChecks;
-        if (operationInProgress) {
-            CallSetTimeoutMakeProgress();
-        } else {
-            MakeProgress();
-        }
+        MakeProgress();
     }
     for (let editable of spellCheckedElements) {
         try {
             onSpellCheck(editable, decNumPendingSpellChecks);
         } catch (err) {
             // The element may not have an editor, so ignore it.
             setTimeout(decNumPendingSpellChecks, 0);
         }
     }
 
     // Take a full snapshot now that all our listeners are set up. This
     // ensures it's impossible for us to miss updates between taking the snapshot
     // and adding our listeners.
-    OperationInProgress();
-    let promise = SendInitCanvasWithSnapshot(forURL);
-    promise.then(function () {
-        OperationCompleted();
-        MakeProgress();
-    });
+    SendInitCanvasWithSnapshot(forURL);
+    MakeProgress();
 }
 
 function OnDocumentLoad(event)
 {
     var currentDoc = content.document;
     if (event.target != currentDoc)
         // Ignore load events for subframes.
         return;
@@ -1049,55 +871,31 @@ function OnDocumentLoad(event)
     var contentRootElement = currentDoc ? currentDoc.documentElement : null;
     currentDoc = null;
     setupFullZoom(contentRootElement);
     setupTextZoom(contentRootElement);
     setupViewport(contentRootElement);
     setupDisplayport(contentRootElement);
     var inPrintMode = false;
 
-    async function AfterOnLoadScripts() {
+    function AfterOnLoadScripts() {
         // Regrab the root element, because the document may have changed.
         var contentRootElement =
           content.document ? content.document.documentElement : null;
 
-        // "MozPaintWait" events are dispatched using a scriptrunner, so we
-        // receive then after painting has finished but before the main thread
-        // returns from the paint call. Then a "MozPaintWaitFinished" is
-        // dispatched to the main thread event loop.
-        // Before Fission both the FlushRendering and SendInitCanvasWithSnapshot
-        // calls were sync, but with Fission they must be async. So before Fission
-        // we got the MozPaintWait event but not the MozPaintWaitFinished event
-        // here (yet), which made us enter WaitForTestEnd. After Fission we get
-        // both MozPaintWait and MozPaintWaitFinished here. So to make this work
-        // the same way as before we just track if we got either event and go
-        // into reftest-wait mode.
-        var paintWaiterFinished = false;
-
-        gExplicitPendingPaintsCompleteHook = function () {
-            LogInfo("PaintWaiters finished while we were sending initial snapshop in AfterOnLoadScripts");
-            paintWaiterFinished = true;
-        }
-
         // Flush the document in case it got modified in a load event handler.
-        await FlushRendering(FlushMode.ALL);
+        FlushRendering(FlushMode.ALL);
 
         // Take a snapshot now. We need to do this before we check whether
         // we should wait, since this might trigger dispatching of
         // MozPaintWait events and make shouldWaitForExplicitPaintWaiters() true
         // below.
-        let painted = await SendInitCanvasWithSnapshot(ourURL);
-
-        gExplicitPendingPaintsCompleteHook = null;
+        var painted = SendInitCanvasWithSnapshot(ourURL);
 
-        if (contentRootElement && Cu.isDeadWrapper(contentRootElement)) {
-            contentRootElement = null;
-        }
-
-        if (paintWaiterFinished || shouldWaitForExplicitPaintWaiters() ||
+        if (shouldWaitForExplicitPaintWaiters() ||
             (!inPrintMode && doPrintMode(contentRootElement)) ||
             // If we didn't force a paint above, in
             // InitCurrentCanvasWithSnapshot, so we should wait for a
             // paint before we consider them done.
             !painted) {
             LogInfo("AfterOnLoadScripts belatedly entering WaitForTestEnd");
             // Go into reftest-wait mode belatedly.
             WaitForTestEnd(contentRootElement, inPrintMode, [], ourURL);
@@ -1319,25 +1117,16 @@ function DoAssertionCheck()
 function LoadURI(uri)
 {
     let loadURIOptions = {
       triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
     };
     webNavigation().loadURI(uri, loadURIOptions);
 }
 
-function LogError(str)
-{
-    if (gVerbose) {
-        sendSyncMessage("reftest:Log", { type: "error", msg: str });
-    } else {
-        sendAsyncMessage("reftest:Log", { type: "error", msg: str });
-    }
-}
-
 function LogWarning(str)
 {
     if (gVerbose) {
         sendSyncMessage("reftest:Log", { type: "warning", msg: str });
     } else {
         sendAsyncMessage("reftest:Log", { type: "warning", msg: str });
     }
 }
@@ -1356,54 +1145,38 @@ function IsSnapshottableTestType()
     // Script, load-only, and PDF-print tests do not need any snapshotting.
     return !(gCurrentTestType == TYPE_SCRIPT ||
              gCurrentTestType == TYPE_LOAD ||
              gCurrentTestType == TYPE_PRINT);
 }
 
 const SYNC_DEFAULT = 0x0;
 const SYNC_ALLOW_DISABLE = 0x1;
-// Returns a promise that resolve when the snapshot is done.
 function SynchronizeForSnapshot(flags)
 {
     if (!IsSnapshottableTestType()) {
-        return Promise.resolve(undefined);
+        return;
     }
 
     if (flags & SYNC_ALLOW_DISABLE) {
         var docElt = content.document.documentElement;
         if (docElt &&
             (docElt.hasAttribute("reftest-no-sync-layers") ||
              docElt.classList.contains("reftest-no-flush"))) {
             LogInfo("Test file chose to skip SynchronizeForSnapshot");
-            return Promise.resolve(undefined);
+            return;
         }
     }
 
-    let browsingContext = content.docShell.browsingContext;
-    let promise = content.getWindowGlobalChild().getActor("ReftestFission").sendQuery("UpdateLayerTree", {browsingContext});
-    return promise.then(function (result) {
-        for (let errorString of result) {
-            LogError(errorString);
-        }
+    windowUtils().updateLayerTree();
 
-        // Setup async scroll offsets now, because any scrollable layers should
-        // have had their AsyncPanZoomControllers created.
-        setupAsyncScrollOffsets({allowFailure:false});
-        setupAsyncZoom({allowFailure:false});
-    }, function(reason) {
-        // We expect actors to go away causing sendQuery's to fail, so
-        // just note it.
-        LogInfo("UpdateLayerTree sendQuery to parent rejected: " + reason);
-
-        // Setup async scroll offsets now, because any scrollable layers should
-        // have had their AsyncPanZoomControllers created.
-        setupAsyncScrollOffsets({allowFailure:false});
-        setupAsyncZoom({allowFailure:false});
-    });
+    // Setup async scroll offsets now, because any scrollable layers should
+    // have had their AsyncPanZoomControllers created.
+    setupAsyncScrollOffsets({allowFailure:false});
+    setupAsyncZoom({allowFailure:false});
 }
 
 function RegisterMessageListeners()
 {
     addMessageListener(
         "reftest:Clear",
         function (m) { RecvClear() }
     );
@@ -1513,53 +1286,47 @@ function SendFailedOpaqueLayer(why)
     sendAsyncMessage("reftest:FailedOpaqueLayer", { why: why });
 }
 
 function SendFailedAssignedLayer(why)
 {
     sendAsyncMessage("reftest:FailedAssignedLayer", { why: why });
 }
 
-// Returns a promise that resolves to a bool that indicates if a snapshot was taken.
+// Return true if a snapshot was taken.
 function SendInitCanvasWithSnapshot(forURL)
 {
     if (forURL != gCurrentURL) {
         LogInfo("SendInitCanvasWithSnapshot called for previous document");
         // Lie and say we painted because it doesn't matter, this is a test we
         // are already done with that is clearing out. Then AfterOnLoadScripts
         // should finish quicker if that is who is calling us.
-        return Promise.resolve(true);
+        return true;
     }
 
     // If we're in the same process as the top-level XUL window, then
     // drawing that window will also update our layers, so no
     // synchronization is needed.
     //
     // NB: this is a test-harness optimization only, it must not
     // affect the validity of the tests.
     if (gBrowserIsRemote) {
-        let promise = SynchronizeForSnapshot(SYNC_DEFAULT);
-        return promise.then(function () {
-            let ret = sendSyncMessage("reftest:InitCanvasWithSnapshot")[0];
-
-            gHaveCanvasSnapshot = ret.painted;
-            return ret.painted;
-        });
+        SynchronizeForSnapshot(SYNC_DEFAULT);
     }
 
     // For in-process browser, we have to make a synchronous request
     // here to make the above optimization valid, so that MozWaitPaint
     // events dispatched (synchronously) during painting are received
     // before we check the paint-wait counter.  For out-of-process
     // browser though, it doesn't wrt correctness whether this request
     // is sync or async.
-    let ret = sendSyncMessage("reftest:InitCanvasWithSnapshot")[0];
+    var ret = sendSyncMessage("reftest:InitCanvasWithSnapshot")[0];
 
     gHaveCanvasSnapshot = ret.painted;
-    return Promise.resolve(ret.painted);
+    return ret.painted;
 }
 
 function SendScriptResults(runtimeMs, error, results)
 {
     sendAsyncMessage("reftest:ScriptResults",
                      { runtimeMs: runtimeMs, error: error, results: results });
 }
 
@@ -1587,52 +1354,51 @@ function roundTo(x, fraction)
 function elementDescription(element)
 {
     return '<' + element.localName +
         [].slice.call(element.attributes).map((attr) =>
             ` ${attr.nodeName}="${attr.value}"`).join('') +
         '>';
 }
 
-function SendUpdateCanvasForEvent(forURL, rectList, contentRootElement)
+function SendUpdateCanvasForEvent(forURL, event, contentRootElement)
 {
     if (forURL != gCurrentURL) {
         LogInfo("SendUpdateCanvasForEvent called for previous document");
         // This is a test we are already done with that is clearing out.
         // Don't do anything.
-        return Promise.resolve(undefined);
+        return;
     }
 
     var win = content;
     var scale = markupDocumentViewer().fullZoom;
 
     var rects = [ ];
     if (shouldSnapshotWholePage(contentRootElement)) {
       // See comments in SendInitCanvasWithSnapshot() re: the split
       // logic here.
       if (!gBrowserIsRemote) {
           sendSyncMessage("reftest:UpdateWholeCanvasForInvalidation");
       } else {
-          let promise = SynchronizeForSnapshot(SYNC_ALLOW_DISABLE);
-          return promise.then(function () {
-            sendAsyncMessage("reftest:UpdateWholeCanvasForInvalidation");
-          });
+          SynchronizeForSnapshot(SYNC_ALLOW_DISABLE);
+          sendAsyncMessage("reftest:UpdateWholeCanvasForInvalidation");
       }
-      return Promise.resolve(undefined);
+      return;
     }
 
     var message;
     if (gIsWebRenderEnabled && !windowUtils().isMozAfterPaintPending) {
         // Webrender doesn't have invalidation, so we just invalidate the whole
         // screen once we don't have anymore paints pending. This will force
         // the snapshot.
 
         LogInfo("Webrender enabled, sending update whole canvas for invalidation");
         message = "reftest:UpdateWholeCanvasForInvalidation";
     } else {
+        var rectList = event.clientRects;
         LogInfo("SendUpdateCanvasForEvent with " + rectList.length + " rects");
         for (var i = 0; i < rectList.length; ++i) {
             var r = rectList[i];
             // Set left/top/right/bottom to "device pixel" boundaries
             var left = Math.floor(roundTo(r.left * scale, 0.001));
             var top = Math.floor(roundTo(r.top * scale, 0.001));
             var right = Math.ceil(roundTo(r.right * scale, 0.001));
             var bottom = Math.ceil(roundTo(r.bottom * scale, 0.001));
@@ -1644,23 +1410,18 @@ function SendUpdateCanvasForEvent(forURL
         message = "reftest:UpdateCanvasForInvalidation";
     }
 
     // See comments in SendInitCanvasWithSnapshot() re: the split
     // logic here.
     if (!gBrowserIsRemote) {
         sendSyncMessage(message, { rects: rects });
     } else {
-        let promise = SynchronizeForSnapshot(SYNC_ALLOW_DISABLE);
-        return promise.then(function () {
-            sendAsyncMessage(message, { rects: rects });
-        });
+        SynchronizeForSnapshot(SYNC_ALLOW_DISABLE);
+        sendAsyncMessage(message, { rects: rects });
     }
-
-    return Promise.resolve(undefined);
 }
-
 if (content.document.readyState == "complete") {
   // load event has already fired for content, get started
   OnInitialLoad();
 } else {
   addEventListener("load", OnInitialLoad, true);
 }
--- a/layout/tools/reftest/reftest.jsm
+++ b/layout/tools/reftest/reftest.jsm
@@ -1505,27 +1505,16 @@ function RegisterMessageListenersAndLoad
         function (m) { RecvUpdateWholeCanvasForInvalidation(); }
     );
     g.browserMessageManager.addMessageListener(
         "reftest:ExpectProcessCrash",
         function (m) { RecvExpectProcessCrash(); }
     );
 
     g.browserMessageManager.loadFrameScript("resource://reftest/reftest-content.js", true, true);
-
-    ChromeUtils.registerWindowActor("ReftestFission", {
-        parent: {
-          moduleURI: "resource://reftest/ReftestFissionParent.jsm",
-        },
-        child: {
-          moduleURI: "resource://reftest/ReftestFissionChild.jsm",
-        },
-        allFrames: true,
-        includeChrome: true,
-    });
 }
 
 function RecvAssertionCount(count)
 {
     DoAssertionCheck(count);
 }
 
 function RecvContentReady(info)
@@ -1579,19 +1568,16 @@ function RecvInitCanvasWithSnapshot()
 
 function RecvLog(type, msg)
 {
     msg = "[CONTENT] " + msg;
     if (type == "info") {
         TestBuffer(msg);
     } else if (type == "warning") {
         logger.warning(msg);
-    } else if (type == "error") {
-        logger.error("REFTEST TEST-UNEXPECTED-FAIL | " + g.currentURL + " | " + msg + "\n");
-        ++g.testResults.Exception;
     } else {
         logger.error("REFTEST TEST-UNEXPECTED-FAIL | " + g.currentURL + " | unknown log type " + type + "\n");
         ++g.testResults.Exception;
     }
 }
 
 function RecvScriptResults(runtimeMs, error, results)
 {