Backed out changeset 0a36cc120d6e (bug 1325942) for ASAN leaks.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 30 Mar 2017 15:47:42 -0400
changeset 379353 fe3e3c0ea489cea724da1bd56ce20fe843d96a9e
parent 379352 0a36cc120d6e7b8bc19176f5efac6b00dd9ad072
child 379354 c6d898a4af88b262ff33191a6ae461fbe9b48521
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1325942
milestone53.0
backs out0a36cc120d6e7b8bc19176f5efac6b00dd9ad072
Backed out changeset 0a36cc120d6e (bug 1325942) for ASAN leaks.
dom/tests/mochitest/fetch/fetch_test_framework.js
dom/tests/mochitest/fetch/worker_wrapper.js
--- a/dom/tests/mochitest/fetch/fetch_test_framework.js
+++ b/dom/tests/mochitest/fetch/fetch_test_framework.js
@@ -12,17 +12,16 @@ function testScript(script) {
   }
 
   function setupPrefs() {
     return new Promise(function(resolve, reject) {
       SpecialPowers.pushPrefEnv({
         "set": [["dom.requestcontext.enabled", true],
                 ["dom.serviceWorkers.enabled", true],
                 ["dom.serviceWorkers.testing.enabled", true],
-                ["dom.serviceWorkers.idle_timeout", 0],
                 ["dom.serviceWorkers.exemptFromPerDomainMax", true]]
       }, resolve);
     });
   }
 
   function workerTest() {
     return new Promise(function(resolve, reject) {
       var worker = new Worker("worker_wrapper.js");
--- a/dom/tests/mochitest/fetch/worker_wrapper.js
+++ b/dom/tests/mochitest/fetch/worker_wrapper.js
@@ -11,55 +11,48 @@ function is(a, b, msg) {
   client.postMessage({type: 'status', status: a === b,
                       msg: a + " === " + b + ": " + msg, context: context});
 }
 
 addEventListener('message', function workerWrapperOnMessage(e) {
   removeEventListener('message', workerWrapperOnMessage);
   var data = e.data;
 
-  function loadTest(event) {
-    var done = function(res) {
+  function loadTest() {
+    var done = function() {
       client.postMessage({ type: 'finish', context: context });
-      return res;
     }
 
     try {
       importScripts(data.script);
       // runTest() is provided by the test.
-      var result = runTest().then(done, done);
-      if ('waitUntil' in event) {
-        event.waitUntil(result);
-      }
+      runTest().then(done, done);
     } catch(e) {
       client.postMessage({
         type: 'status',
         status: false,
         msg: 'worker failed to import ' + data.script + "; error: " + e.message,
         context: context
       });
       done();
     }
   }
 
   if ("ServiceWorker" in self) {
-    // Fetch requests from a service worker are not intercepted.
-    self.isSWPresent = false;
-
-    e.waitUntil(self.clients.matchAll().then(function(clients) {
+    self.clients.matchAll().then(function(clients) {
       for (var i = 0; i < clients.length; ++i) {
         if (clients[i].url.indexOf("message_receiver.html") > -1) {
           client = clients[i];
           break;
         }
       }
       if (!client) {
         dump("We couldn't find the message_receiver window, the test will fail\n");
       }
       context = "ServiceWorker";
-      loadTest(e);
-    }));
+      loadTest();
+    });
   } else {
     client = self;
     context = "Worker";
-    loadTest(e);
+    loadTest();
   }
 });