B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Prune an item from the output queue.
   *
   * @private
   * @param array aItem
   *        The item you want to remove from the output queue.
   */
Prune an item from the output queue.
@private
@param array aItem
The item you want to remove from the output queue.
Prune an item from the output queue . @private @param array aItem The item you want to remove from the output queue .
function WCF__pruneItemFromQueue(aItem)
  {
    let [category, methodOrNode, args] = aItem;
    if (typeof methodOrNode != "function" &&
        methodOrNode._objectActors && !methodOrNode._panelOpen) {
      methodOrNode._objectActors.forEach(this._releaseObject, this);
    }
    if (category == CATEGORY_NETWORK) {
      let connectionId = null;
      if (methodOrNode == this.logNetEvent) {
        connectionId = args[0];
      }
      else if (typeof methodOrNode != "function") {
        connectionId = methodOrNode._connectionId;
      }
      if (connectionId && connectionId in this._networkRequests) {
        delete this._networkRequests[connectionId];
        this._releaseObject(connectionId);
      }
    }
    else if (category == CATEGORY_WEBDEV &&
             methodOrNode == this.logConsoleAPIMessage) {
      let level = args[0].level;
      let releaseObject = function _releaseObject(aValue) {
        if (aValue && typeof aValue == "object" && aValue.actor) {
          this._releaseObject(aValue.actor);
        }
      }.bind(this);
      switch (level) {
        case "log":
        case "info":
        case "warn":
        case "error":
        case "debug":
        case "dir":
        case "groupEnd": {
          args[0].arguments.forEach(releaseObject);
          if (level == "dir") {
            args[0].objectProperties.forEach(function(aObject) {
              ["value", "get", "set"].forEach(function(aProp) {
                releaseObject(aObject[aProp]);
              });
            });
          }
        }
      }
    }
  }
function WCF__pruneItemFromQueue ( aItem ) { let [ category , methodOrNode , args ] = aItem ; if ( typeof methodOrNode != "function" && methodOrNode . _objectActors && ! methodOrNode . _panelOpen ) { methodOrNode . _objectActors . forEach ( this . _releaseObject , this ) ; } if ( category == CATEGORY_NETWORK ) { let connectionId = null ; if ( methodOrNode == this . logNetEvent ) { connectionId = args [ 0 ] ; } else if ( typeof methodOrNode != "function" ) { connectionId = methodOrNode . _connectionId ; } if ( connectionId && connectionId in this . _networkRequests ) { delete this . _networkRequests [ connectionId ] ; this . _releaseObject ( connectionId ) ; } } else if ( category == CATEGORY_WEBDEV && methodOrNode == this . logConsoleAPIMessage ) { let level = args [ 0 ] . level ; let releaseObject = function _releaseObject ( aValue ) { if ( aValue && typeof aValue == "object" && aValue . actor ) { this . _releaseObject ( aValue . actor ) ; } } . bind ( this ) ; switch ( level ) { case "log" : case "info" : case "warn" : case "error" : case "debug" : case "dir" : case "groupEnd" : { args [ 0 ] . arguments . forEach ( releaseObject ) ; if ( level == "dir" ) { args [ 0 ] . objectProperties . forEach ( function ( aObject ) { [ "value" , "get" , "set" ] . forEach ( function ( aProp ) { releaseObject ( aObject [ aProp ] ) ; } ) ; } ) ; } } } } }
Prune an item from the output queue.
Prune an item from the output queue .