DELETE: 1 patches - foojsapi
authorNikhil Marathe <nsm.nikhil@gmail.com>
Wed, 23 Jul 2014 17:30:08 -0700
changeset 1107 bc176b378a8c2b0ff7bed8a82e77f38a6177a7e8
parent 1106 94bf070e5aa8d34d0b940e8dffa715ec5495a61f
child 1108 57c5c4c43a7bd6dc92f3531b194e1626633c4685
push id32
push usernsm.nikhil@gmail.com
push dateThu, 24 Jul 2014 00:32:46 +0000
DELETE: 1 patches - foojsapi DELETE: foojsapi qparent: 666e5e6b3abf qtip: 666e5e6b3abf top: (none)
foojsapi
series
deleted file mode 100644
--- a/foojsapi
+++ /dev/null
@@ -1,102 +0,0 @@
-# HG changeset patch
-# Parent 8bfe3372f8484b77581d32c526db2ca91d79420f
-# User Nikhil Marathe <nsm.nikhil@gmail.com>
-diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp
---- a/dom/workers/ServiceWorkerManager.cpp
-+++ b/dom/workers/ServiceWorkerManager.cpp
-@@ -65,23 +65,24 @@ UpdatePromise::ResolveAllPromises(const 
-   RuntimeService* rs = RuntimeService::GetOrCreateService();
-   MOZ_ASSERT(rs);
- 
-   nsTArray<nsTWeakRef<Promise>> array;
-   array.SwapElements(mPromises);
-   for (uint32_t i = 0; i < array.Length(); ++i) {
-     nsTWeakRef<Promise>& pendingPromise = array.ElementAt(i);
-     if (pendingPromise) {
--      nsCOMPtr<nsIGlobalObject> go =
--        do_QueryInterface(pendingPromise->GetParentObject());
-+      nsCOMPtr<nsIGlobalObject> go = pendingPromise->GetParentObject();
-       MOZ_ASSERT(go);
- 
--      AutoSafeJSContext cx;
-+      AutoJSAPI jsapi;
-+      jsapi.Init(go);
-+      JSContext* cx = jsapi.cx();
-+
-       JS::Rooted<JSObject*> global(cx, go->GetGlobalJSObject());
--      JSAutoCompartment ac(cx, global);
- 
-       GlobalObject domGlobal(cx, global);
- 
-       nsRefPtr<ServiceWorker> serviceWorker;
-       nsresult rv = rs->CreateServiceWorker(domGlobal,
-                                             NS_ConvertUTF8toUTF16(aScriptSpec),
-                                             aScope,
-                                             getter_AddRefs(serviceWorker));
-@@ -962,22 +963,22 @@ ServiceWorkerManager::CreateServiceWorke
-                                                    ServiceWorker** aServiceWorker)
- {
-   AssertIsOnMainThread();
-   MOZ_ASSERT(aWindow);
- 
-   RuntimeService* rs = RuntimeService::GetOrCreateService();
-   nsRefPtr<ServiceWorker> serviceWorker;
- 
-+  AutoJSAPI jsapi;
-+  jsapi.Init(aWindow);
-+  JSContext* cx = jsapi.cx();
-+
-   nsCOMPtr<nsIGlobalObject> sgo = do_QueryInterface(aWindow);
--
--  AutoSafeJSContext cx;
-   JS::Rooted<JSObject*> jsGlobal(cx, sgo->GetGlobalJSObject());
--  JSAutoCompartment ac(cx, jsGlobal);
--
-   GlobalObject global(cx, jsGlobal);
-   nsresult rv = rs->CreateServiceWorker(global,
-                                         NS_ConvertUTF8toUTF16(aScriptSpec),
-                                         aScope,
-                                         getter_AddRefs(serviceWorker));
- 
-   if (NS_WARN_IF(NS_FAILED(rv))) {
-     return rv;
-diff --git a/dom/workers/test/serviceworkers/test_installation_simple.html b/dom/workers/test/serviceworkers/test_installation_simple.html
---- a/dom/workers/test/serviceworkers/test_installation_simple.html
-+++ b/dom/workers/test/serviceworkers/test_installation_simple.html
-@@ -67,29 +67,35 @@
-       ok(false, "realWorker Registration should have succeeded!");
-     });
-   }
- 
-   function abortPrevious() {
-     var p = navigator.serviceWorker.register("worker2.js", { scope: "foo/*" });
-     var q = navigator.serviceWorker.register("worker3.js", { scope: "foo/*" });
- 
--    return Promise.all([
-+    var r = Promise.all([
-       p.then(function(w) {
-         ok(false, "First registration should fail with AbortError");
-       }, function(e) {
-         ok(e.name === "AbortError", "First registration should fail with AbortError");
-       }),
- 
-       q.then(function(w) {
-         ok(w instanceof ServiceWorker, "Second registration should succeed");
-       }, function(e) {
-         ok(false, "Second registration should succeed");
-       })
-     ]);
-+    setTimeout(function() {
-+    SpecialPowers.gc();
-+    SpecialPowers.gc();
-+    SpecialPowers.gc();
-+    }, 500);
-+    return r;
-   }
- 
-   function networkError404() {
-     return navigator.serviceWorker.register("404.js").then(function(w) {
-         todo(false, "Should fail with NetworkError");
-       }, function(e) {
-         todo(e.name === "NetworkError", "Should fail with NetworkError");
-       });
--- a/series
+++ b/series
@@ -1,9 +1,8 @@
-foojsapi
 sw-instance-events-and-state-2
 sw-instance-events-and-state
 903441-stuff
 898524-1-nowhite
 898524-2-nowhite
 857464-push-prefs
 857464-push-webpages
 885093-push-prompt