B2G/gecko/toolkit/mozapps/extensions/content/extensions-content.js
/**
 * Child part of InstallTrigger e10s handling.
 *
 * Sets up InstallTrigger for newly-created windows,
 * that will relay messages for InstallTrigger
 * activity. We also process the parameters for
 * the InstallTrigger to proper parameters for
 * amIWebInstaller.
 */
Child part of InstallTrigger e10s handling.
Sets up InstallTrigger for newly-created windows,
that will relay messages for InstallTrigger
activity. We also process the parameters for
the InstallTrigger to proper parameters for
amIWebInstaller.
Child part of InstallTrigger e10s handling . Sets up InstallTrigger for newly - created windows that will relay messages for InstallTrigger activity . We also process the parameters for the InstallTrigger to proper parameters for amIWebInstaller .
function InstallTriggerManager() {
  this.callbacks = {};
  addMessageListener(MSG_INSTALL_CALLBACK, this);
  try {
    if (Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).processType !== Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
      addMessageListener(MSG_JAR_FLUSH, function(msg) {
        let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
        file.initWithPath(msg.json);
        Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService)
          .notifyObservers(file, "flush-cache-entry", null);
      });
    }
  } catch(e) {
    Cu.reportError(e);
  }
  addEventListener("DOMWindowCreated", this, false);
  var self = this;
  addEventListener("unload", function() {
    self.callbacks = null;
  }, false);
}
function InstallTriggerManager ( ) { this . callbacks = { } ; addMessageListener ( MSG_INSTALL_CALLBACK , this ) ; try { if ( Cc [ "@mozilla.org/xre/app-info;1" ] . getService ( Ci . nsIXULRuntime ) . processType !== Ci . nsIXULRuntime . PROCESS_TYPE_DEFAULT ) { addMessageListener ( MSG_JAR_FLUSH , function ( msg ) { let file = Cc [ "@mozilla.org/file/local;1" ] . createInstance ( Ci . nsIFile ) ; file . initWithPath ( msg . json ) ; Cc [ "@mozilla.org/observer-service;1" ] . getService ( Ci . nsIObserverService ) . notifyObservers ( file , "flush-cache-entry" , null ) ; } ) ; } } catch ( e ) { Cu . reportError ( e ) ; } addEventListener ( "DOMWindowCreated" , this , false ) ; var self = this ; addEventListener ( "unload" , function ( ) { self . callbacks = null ; } , false ) ; }
Child part of InstallTrigger e10s handling.
Child part of InstallTrigger e10s handling .
// only if we live in a child process... // ... propagate JAR cache flush notifications across process boundaries // Clean up all references, to help gc work quickly