B2G/gecko/dom/base/ConsoleAPIStorage.jsm
/**
   * Record an event associated with the given window ID.
   *
   * @param string aWindowID
   *        The ID of the inner window for which the event occurred.
   * @param object aEvent
   *        A JavaScript object you want to store.
   */
Record an event associated with the given window ID.
@param string aWindowID
The ID of the inner window for which the event occurred.
@param object aEvent
A JavaScript object you want to store.
Record an event associated with the given window ID . @param string aWindowID The ID of the inner window for which the event occurred . @param object aEvent A JavaScript object you want to store .
function CS_recordEvent(aWindowID, aEvent)
  {
    let ID = parseInt(aWindowID);
    if (isNaN(ID)) {
      throw new Error("Invalid window ID argument");
    }
    if (!_consoleStorage[ID]) {
      _consoleStorage[ID] = [];
    }
    let storage = _consoleStorage[ID];
    storage.push(aEvent);
    if (storage.length > STORAGE_MAX_EVENTS) {
      storage.shift();
    }
    Services.obs.notifyObservers(aEvent, "console-storage-cache-event", ID);
  }
function CS_recordEvent ( aWindowID , aEvent ) { let ID = parseInt ( aWindowID ) ; if ( isNaN ( ID ) ) { throw new Error ( "Invalid window ID argument" ) ; } if ( ! _consoleStorage [ ID ] ) { _consoleStorage [ ID ] = [ ] ; } let storage = _consoleStorage [ ID ] ; storage . push ( aEvent ) ; if ( storage . length > STORAGE_MAX_EVENTS ) { storage . shift ( ) ; } Services . obs . notifyObservers ( aEvent , "console-storage-cache-event" , ID ) ; }
Record an event associated with the given window ID.
Record an event associated with the given window ID .
// truncate