B2G/gecko/netwerk/test/httpserver/test/test_async_response_sending.js
/**
   * Adds the given array of bytes to data in the copier's source.
   *
   * @param bytes : [uint]
   *   array of bytes of data to add to the source for the copier
   */
Adds the given array of bytes to data in the copier's source.
@param bytes : [uint]
array of bytes of data to add to the source for the copier
Adds the given array of bytes to data in the copier ' s source . @param bytes : [ uint ] array of bytes of data to add to the source for the copier
function addToSource(bytes)
  {
    var self = this;
    this._addToTasks(function addToSourceTask()
    {
      note("addToSourceTask");
      try
      {
        self._copyableDataStream.makeWritable(bytes.length);
        self._copyableDataStream.writeByteArray(bytes, bytes.length);
      }
      finally
      {
        self._stageNextTask();
      }
    });
  }
function addToSource ( bytes ) { var self = this ; this . _addToTasks ( function addToSourceTask ( ) { note ( "addToSourceTask" ) ; try { self . _copyableDataStream . makeWritable ( bytes . length ) ; self . _copyableDataStream . writeByteArray ( bytes , bytes . length ) ; } finally { self . _stageNextTask ( ) ; } } ) ; }
Adds the given array of bytes to data in the copier's source.
Adds the given array of bytes to data in the copier ' s source .