B2G/gecko/netwerk/test/httpserver/test/test_async_response_sending.js
/**
   * Closes the copier's sink stream, then immediately closes the copier's
   * source stream, then asynchronously continues to the next task.
   *
   * @param sinkStatus : nsresult
   *   the status to provide when closing the copier's sink stream
   * @param sourceStatus : nsresult
   *   the status to provide when closing the copier's source stream
   */
Closes the copier's sink stream, then immediately closes the copier's
source stream, then asynchronously continues to the next task.

@param sinkStatus : nsresult
the status to provide when closing the copier's sink stream
@param sourceStatus : nsresult
the status to provide when closing the copier's source stream
Closes the copier ' s sink stream then immediately closes the copier ' s source stream then asynchronously continues to the next task . @param sinkStatus : nsresult the status to provide when closing the copier ' s sink stream @param sourceStatus : nsresult the status to provide when closing the copier ' s source stream
function closeSinkThenSource(sinkStatus, sourceStatus)
  {
    var self = this;
    this._addToTasks(function closeSinkThenSourceTask()
    {
      note("closeSinkThenSource");
      self._sink.closeWithStatus(sinkStatus);
      self._source.closeWithStatus(sourceStatus);
      self._stageNextTask();
    });
  }
function closeSinkThenSource ( sinkStatus , sourceStatus ) { var self = this ; this . _addToTasks ( function closeSinkThenSourceTask ( ) { note ( "closeSinkThenSource" ) ; self . _sink . closeWithStatus ( sinkStatus ) ; self . _source . closeWithStatus ( sourceStatus ) ; self . _stageNextTask ( ) ; } ) ; }
Closes the copier's sink stream, then immediately closes the copier's
 source stream, then asynchronously continues to the next task.
Closes the copier ' s sink stream then immediately closes the copier ' s source stream then asynchronously continues to the next task .