B2G/gecko/dom/push/src/PushService.jsm
// records are objects describing the registrations as stored in IndexedDB.
records are objects describing the registrations as stored in IndexedDB.
records are objects describing the registrations as stored in IndexedDB .
function wakeupRegisteredApps(records) {
      var wakeupTable = {};
      for (var i = 0; i < records.length; i++) {
        var record = records[i];
        if (!(record.manifestURL in wakeupTable))
          wakeupTable[record.manifestURL] = [];
        wakeupTable[record.manifestURL].push(record.pageURL);
      }
      let messenger = Cc["@mozilla.org/system-message-internal;1"]
                        .getService(Ci.nsISystemMessagesInternal);
      for (var manifestURL in wakeupTable) {
        wakeupTable[manifestURL].forEach(function(pageURL) {
          messenger.sendMessage('push-register', {},
                                Services.io.newURI(pageURL, null, null),
                                Services.io.newURI(manifestURL, null, null));
        });
      }
      deferred.resolve();
    }
function wakeupRegisteredApps ( records ) { var wakeupTable = { } ; for ( var i = 0 ; i < records . length ; i ++ ) { var record = records [ i ] ; if ( ! ( record . manifestURL in wakeupTable ) ) wakeupTable [ record . manifestURL ] = [ ] ; wakeupTable [ record . manifestURL ] . push ( record . pageURL ) ; } let messenger = Cc [ "@mozilla.org/system-message-internal;1" ] . getService ( Ci . nsISystemMessagesInternal ) ; for ( var manifestURL in wakeupTable ) { wakeupTable [ manifestURL ] . forEach ( function ( pageURL ) { messenger . sendMessage ( 'push-register' , { } , Services . io . newURI ( pageURL , null , null ) , Services . io . newURI ( manifestURL , null , null ) ) ; } ) ; } deferred . resolve ( ) ; }
records are objects describing the registrations as stored in IndexedDB.
records are objects describing the registrations as stored in IndexedDB .
// Pages to be notified. // wakeupTable[manifestURL] -> [ pageURL ]