Bug 1551873 - Fix JSWindowActor's intermittent TV failures; r=nika, a=test-only
authorJohn Dai <jdai@mozilla.com>
Thu, 23 May 2019 08:50:51 +0000
changeset 536554 288b1a2a4ead152fb500bdf2480834f483ee914e
parent 536553 42241f2761dedec1f48e5fb3e4103f20b049f46a
child 536555 ccbcc49ab535327e42994b3ef1f72513f0887e02
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika, test-only
bugs1551873
milestone68.0
Bug 1551873 - Fix JSWindowActor's intermittent TV failures; r=nika, a=test-only Differential Revision: https://phabricator.services.mozilla.com/D31788
dom/ipc/tests/JSWindowActor/head.js
--- a/dom/ipc/tests/JSWindowActor/head.js
+++ b/dom/ipc/tests/JSWindowActor/head.js
@@ -59,17 +59,18 @@ function declTest(name, cfg) {
 
     // Wait for the provided URL to load in our browser
     let browser = win.gBrowser.selectedBrowser;
     BrowserTestUtils.loadURI(browser, url);
     await BrowserTestUtils.browserLoaded(browser);
 
     // Run the provided test
     info("browser ready");
-    await Promise.resolve(test(browser, win));
-
-    // Clean up after we're done.
-    ChromeUtils.unregisterWindowActor("Test");
-    await BrowserTestUtils.closeWindow(win);
-
-    info("Exiting test: " + name);
+    try {
+      await Promise.resolve(test(browser, win));
+    } finally {
+      // Clean up after we're done.
+      ChromeUtils.unregisterWindowActor("Test");
+      await BrowserTestUtils.closeWindow(win);
+      info("Exiting test: " + name);
+    }
   });
 }