Bug 1266540 - Stub out Push error reporting for the GCM and H2 backends. r=wchen
authorKit Cambridge <kcambridge@mozilla.com>
Thu, 21 Apr 2016 13:35:26 -0700
changeset 294433 029ff9fb258a6403ca6528b812cdf434c31d7775
parent 294432 637e80ab4fca8d6fe9d1c0ef471c75c338334bcd
child 294434 8deda08fc04b19c6af99569dcc0c6c767c8c3cd5
push id30203
push usercbook@mozilla.com
push dateFri, 22 Apr 2016 13:56:37 +0000
treeherdermozilla-central@fc15477ce628 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswchen
bugs1266540
milestone48.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 1266540 - Stub out Push error reporting for the GCM and H2 backends. r=wchen MozReview-Commit-ID: 9TFH69IrQpP
dom/push/PushServiceAndroidGCM.jsm
dom/push/PushServiceHttp2.jsm
--- a/dom/push/PushServiceAndroidGCM.jsm
+++ b/dom/push/PushServiceAndroidGCM.jsm
@@ -120,17 +120,17 @@ this.PushServiceAndroidGCM = {
         message = ChromeUtils.base64URLDecode(data.message, {
           // The Push server may append padding.
           padding: "ignore",
         });
       }
 
       console.debug("Delivering message to main PushService:", message, cryptoParams);
       this._mainPushService.receivedPushMessage(
-        data.channelID, message, cryptoParams, (record) => {
+        data.channelID, "", message, cryptoParams, (record) => {
           // Always update the stored record.
           return record;
         });
       return;
     }
   },
 
   _configure: function(serverURL, debug) {
@@ -234,16 +234,21 @@ this.PushServiceAndroidGCM = {
 
   unregister: function(record) {
     console.debug("unregister: ", record);
     return Messaging.sendRequestForResult({
       type: "PushServiceAndroidGCM:UnsubscribeChannel",
       channelID: record.keyID,
     });
   },
+
+  reportDeliveryError: function(messageID, reason) {
+    console.warn("reportDeliveryError: Ignoring message delivery error",
+      messageID, reason);
+  },
 };
 
 function PushRecordAndroidGCM(record) {
   PushRecord.call(this, record);
   this.channelID = record.channelID;
 }
 
 PushRecordAndroidGCM.prototype = Object.create(PushRecord.prototype, {
--- a/dom/push/PushServiceHttp2.jsm
+++ b/dom/push/PushServiceHttp2.jsm
@@ -708,16 +708,21 @@ this.PushServiceHttp2 = {
     this._listenersPendingRetry.clear();
   },
 
   unregister: function(aRecord) {
     this._shutdownSubscription(aRecord.subscriptionUri);
     return this._unsubscribeResource(aRecord.subscriptionUri);
   },
 
+  reportDeliveryError: function(messageID, reason) {
+    console.warn("reportDeliveryError: Ignoring message delivery error",
+      messageID, reason);
+  },
+
   /** Push server has deleted subscription.
    *  Re-subscribe - if it succeeds send update db record and send
    *                 pushsubscriptionchange,
    *               - on error delete record and send pushsubscriptionchange
    *  TODO: maybe pushsubscriptionerror will be included.
    */
   _resubscribe: function(aSubscriptionUri) {
     this._mainPushService.getByKeyID(aSubscriptionUri)