Backed out changeset 9bcbe80a4a7a (bug 1264815)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 31 May 2016 07:05:02 +0200
changeset 338538 f7aead3c999ab2db8fcc11565bf4050aefbd7019
parent 338537 dfaeab92707ed476b947ce123593f8e728157d8e
child 338539 66d97d875f04fcbdf123e72492e1f232efafdb19
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1264815
milestone49.0a1
backs out9bcbe80a4a7aacc9447d2bd60ecb6383242f584c
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 9bcbe80a4a7a (bug 1264815)
dom/interfaces/notification/nsINotificationStorage.idl
dom/notification/Notification.cpp
dom/notification/Notification.h
dom/notification/NotificationStorage.js
--- a/dom/interfaces/notification/nsINotificationStorage.idl
+++ b/dom/interfaces/notification/nsINotificationStorage.idl
@@ -23,17 +23,17 @@ interface nsINotificationStorageCallback
               in DOMString title,
               in DOMString dir,
               in DOMString lang,
               in DOMString body,
               in DOMString tag,
               in DOMString icon,
               in DOMString data,
               in DOMString behavior,
-              in DOMString serviceWorkerRegistrationScope);
+              in DOMString serviceWorkerRegistrationID);
 
   /**
    * Callback function used to notify C++ the we have returned
    * all notification objects for this Notification.get call.
    */
   void done();
 };
 
@@ -71,17 +71,17 @@ interface nsINotificationStorage : nsISu
            in DOMString dir,
            in DOMString lang,
            in DOMString body,
            in DOMString tag,
            in DOMString icon,
            in DOMString alertName,
            in DOMString data,
            in DOMString behavior,
-           in DOMString serviceWorkerRegistrationScope);
+           in DOMString serviceWorkerRegistrationID);
 
   /**
    * Retrieve a list of notifications.
    *
    * @param origin: the origin/app for which to fetch notifications from
    * @param tag: used to fetch only a specific tag
    * @param callback: nsINotificationStorageCallback, used for
    *                  returning notifications objects
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -73,17 +73,17 @@ struct NotificationStrings
   const nsString mTitle;
   const nsString mDir;
   const nsString mLang;
   const nsString mBody;
   const nsString mTag;
   const nsString mIcon;
   const nsString mData;
   const nsString mBehavior;
-  const nsString mServiceWorkerRegistrationScope;
+  const nsString mServiceWorkerRegistrationID;
 };
 
 class ScopeCheckingGetCallback : public nsINotificationStorageCallback
 {
   const nsString mScope;
 public:
   explicit ScopeCheckingGetCallback(const nsAString& aScope)
     : mScope(aScope)
@@ -93,37 +93,37 @@ public:
                     const nsAString& aTitle,
                     const nsAString& aDir,
                     const nsAString& aLang,
                     const nsAString& aBody,
                     const nsAString& aTag,
                     const nsAString& aIcon,
                     const nsAString& aData,
                     const nsAString& aBehavior,
-                    const nsAString& aServiceWorkerRegistrationScope) final
+                    const nsAString& aServiceWorkerRegistrationID) final
   {
     AssertIsOnMainThread();
     MOZ_ASSERT(!aID.IsEmpty());
 
     // Skip scopes that don't match when called from getNotifications().
-    if (!mScope.IsEmpty() && !mScope.Equals(aServiceWorkerRegistrationScope)) {
+    if (!mScope.IsEmpty() && !mScope.Equals(aServiceWorkerRegistrationID)) {
       return NS_OK;
     }
 
     NotificationStrings strings = {
       nsString(aID),
       nsString(aTitle),
       nsString(aDir),
       nsString(aLang),
       nsString(aBody),
       nsString(aTag),
       nsString(aIcon),
       nsString(aData),
       nsString(aBehavior),
-      nsString(aServiceWorkerRegistrationScope),
+      nsString(aServiceWorkerRegistrationID),
     };
 
     mStrings.AppendElement(Move(strings));
     return NS_OK;
   }
 
   NS_IMETHOD Done() override = 0;
 
@@ -164,17 +164,17 @@ public:
                                           mStrings[i].mDir,
                                           mStrings[i].mLang,
                                           mStrings[i].mBody,
                                           mStrings[i].mTag,
                                           mStrings[i].mIcon,
                                           mStrings[i].mData,
                                           /* mStrings[i].mBehavior, not
                                            * supported */
-                                          mStrings[i].mServiceWorkerRegistrationScope,
+                                          mStrings[i].mServiceWorkerRegistrationID,
                                           result);
 
       n->SetStoredState(true);
       Unused << NS_WARN_IF(result.Failed());
       if (!result.Failed()) {
         notifications.AppendElement(n.forget());
       }
     }
@@ -1078,17 +1078,17 @@ Notification::ConstructFromFields(
     const nsAString& aID,
     const nsAString& aTitle,
     const nsAString& aDir,
     const nsAString& aLang,
     const nsAString& aBody,
     const nsAString& aTag,
     const nsAString& aIcon,
     const nsAString& aData,
-    const nsAString& aServiceWorkerRegistrationScope,
+    const nsAString& aServiceWorkerRegistrationID,
     ErrorResult& aRv)
 {
   MOZ_ASSERT(aGlobal);
 
   RootedDictionary<NotificationOptions> options(nsContentUtils::RootingCxForThread());
   options.mDir = Notification::StringToDirection(nsString(aDir));
   options.mLang = aLang;
   options.mBody = aBody;
@@ -1097,17 +1097,17 @@ Notification::ConstructFromFields(
   RefPtr<Notification> notification = CreateInternal(aGlobal, aID, aTitle,
                                                      options);
 
   notification->InitFromBase64(aData, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
-  notification->SetScope(aServiceWorkerRegistrationScope);
+  notification->SetScope(aServiceWorkerRegistrationID);
 
   return notification.forget();
 }
 
 nsresult
 Notification::PersistNotification()
 {
   AssertIsOnMainThread();
@@ -2108,17 +2108,17 @@ public:
                                           mStrings[i].mDir,
                                           mStrings[i].mLang,
                                           mStrings[i].mBody,
                                           mStrings[i].mTag,
                                           mStrings[i].mIcon,
                                           mStrings[i].mData,
                                           /* mStrings[i].mBehavior, not
                                            * supported */
-                                          mStrings[i].mServiceWorkerRegistrationScope,
+                                          mStrings[i].mServiceWorkerRegistrationID,
                                           result);
 
       n->SetStoredState(true);
       Unused << NS_WARN_IF(result.Failed());
       if (!result.Failed()) {
         notifications.AppendElement(n.forget());
       }
     }
--- a/dom/notification/Notification.h
+++ b/dom/notification/Notification.h
@@ -180,17 +180,17 @@ public:
     const nsAString& aID,
     const nsAString& aTitle,
     const nsAString& aDir,
     const nsAString& aLang,
     const nsAString& aBody,
     const nsAString& aTag,
     const nsAString& aIcon,
     const nsAString& aData,
-    const nsAString& aServiceWorkerRegistrationScope,
+    const nsAString& aServiceWorkerRegistrationID,
     ErrorResult& aRv);
 
   void GetID(nsAString& aRetval) {
     aRetval = mID;
   }
 
   void GetTitle(nsAString& aRetval)
   {
--- a/dom/notification/NotificationStorage.js
+++ b/dom/notification/NotificationStorage.js
@@ -79,32 +79,32 @@ NotificationStorage.prototype = {
   canPut: function(aOrigin) {
     if (DEBUG) debug("Querying appService for: " + aOrigin);
     let rv = !!appsService.getAppByManifestURL(aOrigin);
     if (DEBUG) debug("appService returned: " + rv);
     return rv;
   },
 
   put: function(origin, id, title, dir, lang, body, tag, icon, alertName,
-                data, behavior, serviceWorkerRegistrationScope) {
+                data, behavior, serviceWorkerRegistrationID) {
     if (DEBUG) { debug("PUT: " + origin + " " + id + ": " + title); }
     var notification = {
       id: id,
       title: title,
       dir: dir,
       lang: lang,
       body: body,
       tag: tag,
       icon: icon,
       alertName: alertName,
       timestamp: new Date().getTime(),
       origin: origin,
       data: data,
       mozbehavior: behavior,
-      serviceWorkerRegistrationScope: serviceWorkerRegistrationScope,
+      serviceWorkerRegistrationID: serviceWorkerRegistrationID,
     };
 
     this._notifications[id] = notification;
     if (tag) {
       if (!this._byTag[origin]) {
         this._byTag[origin] = {};
       }
 
@@ -136,19 +136,19 @@ NotificationStorage.prototype = {
   },
 
   getByID: function(origin, id, callback) {
     if (DEBUG) { debug("GETBYID: " + origin + " " + id); }
     var GetByIDProxyCallback = function(id, originalCallback) {
       this.searchID = id;
       this.originalCallback = originalCallback;
       var self = this;
-      this.handle = function(id, title, dir, lang, body, tag, icon, data, behavior, serviceWorkerRegistrationScope) {
+      this.handle = function(id, title, dir, lang, body, tag, icon, data, behavior, serviceWorkerRegistrationID) {
         if (id == this.searchID) {
-          self.originalCallback.handle(id, title, dir, lang, body, tag, icon, data, behavior, serviceWorkerRegistrationScope);
+          self.originalCallback.handle(id, title, dir, lang, body, tag, icon, data, behavior, serviceWorkerRegistrationID);
         }
       };
       this.done = function() {
         self.originalCallback.done();
       };
     };
 
     return this.get(origin, "", new GetByIDProxyCallback(id, callback));
@@ -241,17 +241,17 @@ NotificationStorage.prototype = {
                                notification.title,
                                notification.dir,
                                notification.lang,
                                notification.body,
                                notification.tag,
                                notification.icon,
                                notification.data,
                                notification.mozbehavior,
-                               notification.serviceWorkerRegistrationScope),
+                               notification.serviceWorkerRegistrationID),
           Ci.nsIThread.DISPATCH_NORMAL);
       } catch (e) {
         if (DEBUG) { debug("Error calling callback handle: " + e); }
       }
     });
     try {
       Services.tm.currentThread.dispatch(callback.done,
                                          Ci.nsIThread.DISPATCH_NORMAL);