Backed out changeset f48599a7efa2 (bug 890928) for B2G mochitest orange.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 12 Jul 2013 16:00:44 -0400
changeset 138382 becae65c3e08009e031a71d9fbd6a8f1106d5161
parent 138381 35fca04046338dd43273add82a3ead5ba60c0d7f
child 138383 c5009e8f760135989f77845cd2c27d07d2788a85
push id30946
push userryanvm@gmail.com
push dateFri, 12 Jul 2013 20:00:41 +0000
treeherdermozilla-inbound@becae65c3e08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs890928
milestone25.0a1
backs outf48599a7efa26242a3f02c974abc5f2e52f8a4a8
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 changeset f48599a7efa2 (bug 890928) for B2G mochitest orange.
dom/workers/URL.cpp
dom/workers/test/test_url.html
dom/workers/test/url_worker.js
--- a/dom/workers/URL.cpp
+++ b/dom/workers/URL.cpp
@@ -139,17 +139,17 @@ public:
       doc = window->GetExtantDoc();
       if (!doc) {
         SetDOMStringToNull(mURL);
         return;
       }
 
       principal = doc->NodePrincipal();
     } else {
-      MOZ_ASSERT_IF(!mWorkerPrivate->GetParent(), mWorkerPrivate->IsChromeWorker());
+      MOZ_ASSERT(mWorkerPrivate->IsChromeWorker());
       principal = mWorkerPrivate->GetPrincipal();
     }
 
     nsCString url;
     nsresult rv = nsHostObjectProtocolHandler::AddDataEntry(
         NS_LITERAL_CSTRING(BLOBURI_SCHEME),
         mBlob, principal, url);
 
@@ -194,17 +194,17 @@ public:
     if (window) {
       doc = window->GetExtantDoc();
       if (!doc) {
         return;
       }
 
       principal = doc->NodePrincipal();
     } else {
-      MOZ_ASSERT_IF(!mWorkerPrivate->GetParent(), mWorkerPrivate->IsChromeWorker());
+      MOZ_ASSERT(mWorkerPrivate->IsChromeWorker());
       principal = mWorkerPrivate->GetPrincipal();
     }
 
     NS_ConvertUTF16toUTF8 url(mURL);
 
     nsIPrincipal* urlPrincipal =
       nsHostObjectProtocolHandler::GetDataEntryPrincipal(url);
 
--- a/dom/workers/test/test_url.html
+++ b/dom/workers/test/test_url.html
@@ -16,17 +16,17 @@
 <script class="testbody" type="text/javascript">
 
   var worker = new Worker("url_worker.js");
 
   worker.onmessage = function(event) {
     is(event.target, worker);
 
     if (event.data.type == 'finish') {
-      runTest();
+      SimpleTest.finish();
     } else if (event.data.type == 'status') {
       ok(event.data.status, event.data.msg);
     } else if (event.data.type == 'url') {
       var xhr = new XMLHttpRequest();
       xhr.open('GET', event.data.url, false);
       xhr.onreadystatechange = function() {
         if (xhr.readyState == 4) {
           ok(true, "Blob readable!");
@@ -37,31 +37,17 @@
   };
 
   worker.onerror = function(event) {
     is(event.target, worker);
     ok(false, "Worker had an error: " + event.data);
     SimpleTest.finish();
   };
 
-  var tests = [
-    function() { worker.postMessage(0); },
-    function() { worker.postMessage(4); }
-  ];
+  worker.postMessage(true);
 
-  function runTest() {
-    if (!tests.length) {
-      SimpleTest.finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  runTest();
   SimpleTest.waitForExplicitFinish();
 
 </script>
 </pre>
 </body>
 </html>
 
--- a/dom/workers/test/url_worker.js
+++ b/dom/workers/test/url_worker.js
@@ -1,19 +1,9 @@
-onmessage = function(event) {
-  if (event.data != 0) {
-    var worker = new Worker('url_worker.js');
-    worker.onmessage = function(event) {
-      postMessage(event.data);
-    }
-
-    worker.postMessage(event.data - 1);
-    return;
-  }
-
+onmessage = function() {
   status = false;
   try {
     if ((URL instanceof Object)) {
       status = true;
     }
   } catch(e) {
   }