B2G/gecko/netwerk/test/httpserver/test/test_async_response_sending.js
/**
   * Closes the copier's sink stream, providing the given status, then
   * asynchronously continue to the next task.
   *
   * @param status : nsresult
   *   the status to provide when closing the copier's sink stream
   */
Closes the copier's sink stream, providing the given status, then
asynchronously continue to the next task.

@param status : nsresult
the status to provide when closing the copier's sink stream
Closes the copier ' s sink stream providing the given status then asynchronously continue to the next task . @param status : nsresult the status to provide when closing the copier ' s sink stream
function closeSink(status)
  {
    var self = this;
    this._addToTasks(function closeSinkTask()
    {
      note("closeSinkTask");
      self._sink.closeWithStatus(status);
      self._stageNextTask();
    });
  }
function closeSink ( status ) { var self = this ; this . _addToTasks ( function closeSinkTask ( ) { note ( "closeSinkTask" ) ; self . _sink . closeWithStatus ( status ) ; self . _stageNextTask ( ) ; } ) ; }
Closes the copier's sink stream, providing the given status, then
 asynchronously continue to the next task.
Closes the copier ' s sink stream providing the given status then asynchronously continue to the next task .