Bug 1189675 - Make all ServiceWorker events non cancelable. r=catalinb
☠☠ backed out by ac055dab935a ☠ ☠
authorNikhil Marathe <nsm.nikhil@gmail.com>
Fri, 21 Aug 2015 17:38:18 -0700
changeset 259095 a7c27770b861504e13e95d4d58998eb50c634884
parent 259094 471a45b97ce2264a08a933bdddcf8c71f65b001a
child 259096 d4fa5cfc4b8634f6b74cc687d2ec8f8b5103727c
push id29268
push userryanvm@gmail.com
push dateTue, 25 Aug 2015 00:37:23 +0000
treeherdermozilla-central@08015770c9d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscatalinb
bugs1189675
milestone43.0a1
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
Bug 1189675 - Make all ServiceWorker events non cancelable. r=catalinb Update web-platform-tests expected data
dom/workers/ServiceWorkerManager.cpp
testing/web-platform/mozilla/meta/service-workers/service-worker/install-event-type.https.html.ini
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -1898,17 +1898,17 @@ LifecycleEventWorkerRunnable::DispatchLi
 
   nsRefPtr<ExtendableEvent> event;
   nsRefPtr<EventTarget> target = aWorkerPrivate->GlobalScope();
 
   if (mEventName.EqualsASCII("install") || mEventName.EqualsASCII("activate")) {
     // FIXME(nsm): Bug 982787 pass previous active worker.
     ExtendableEventInit init;
     init.mBubbles = false;
-    init.mCancelable = true;
+    init.mCancelable = false;
     event = ExtendableEvent::Constructor(target, mEventName, init);
   } else {
     MOZ_CRASH("Unexpected lifecycle event");
   }
 
   event->SetTrusted(true);
 
   nsRefPtr<Promise> waitUntilPromise =
@@ -2299,17 +2299,17 @@ public:
   {
     MOZ_ASSERT(aWorkerPrivate);
     GlobalObject globalObj(aCx, aWorkerPrivate->GlobalScope()->GetWrapper());
 
     PushEventInit pei;
     // FIXME(nsm): Bug 1149195.
     // pei.mData.Construct(mData);
     pei.mBubbles = false;
-    pei.mCancelable = true;
+    pei.mCancelable = false;
 
     ErrorResult result;
     nsRefPtr<PushEvent> event =
       PushEvent::Constructor(globalObj, NS_LITERAL_STRING("push"), pei, result);
     if (NS_WARN_IF(result.Failed())) {
       result.SuppressException();
       return false;
     }
@@ -2498,17 +2498,17 @@ public:
                                         mData, mScope, result);
     if (NS_WARN_IF(result.Failed())) {
       return false;
     }
 
     NotificationEventInit nei;
     nei.mNotification = notification;
     nei.mBubbles = false;
-    nei.mCancelable = true;
+    nei.mCancelable = false;
 
     nsRefPtr<NotificationEvent> event =
       NotificationEvent::Constructor(target, NS_LITERAL_STRING("notificationclick"), nei, result);
     if (NS_WARN_IF(result.Failed())) {
       return false;
     }
 
     aWorkerPrivate->GlobalScope()->AllowWindowInteraction();
@@ -3813,17 +3813,17 @@ private:
     internalReq->SetReferrer(NS_ConvertUTF8toUTF16(mReferrer));
 
     request->SetContentPolicyType(mContentPolicyType);
 
     RootedDictionary<FetchEventInit> init(aCx);
     init.mRequest.Construct();
     init.mRequest.Value() = request;
     init.mBubbles = false;
-    init.mCancelable = true;
+    init.mCancelable = false;
     init.mIsReload.Construct(mIsReload);
     nsRefPtr<FetchEvent> event =
       FetchEvent::Constructor(globalObj, NS_LITERAL_STRING("fetch"), init, result);
     if (NS_WARN_IF(result.Failed())) {
       result.SuppressException();
       return false;
     }
 
deleted file mode 100644
--- a/testing/web-platform/mozilla/meta/service-workers/service-worker/install-event-type.https.html.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-[install-event-type.https.html]
-  type: testharness
-  expected: ERROR
-  [install event type]
-    expected: FAIL
-