B2G/gecko/netwerk/test/httpserver/test/test_async_response_sending.js
/** Dispatches an event at this thread which will run the next task. */
Dispatches an event at this thread which will run the next task.
Dispatches an event at this thread which will run the next task .
function _stageNextTask()
  {
    dumpn("*** CopyTest(" + this.name + ")._stageNextTask()");
    if (this._currentTask === this._tasks.length)
    {
      dumpn("*** CopyTest(" + this.name + ") tasks complete!");
      return;
    }
    var task = this._tasks[this._currentTask++];
    var self = this;
    var event =
      {
        run: function run()
        {
          try
          {
            task();
          }
          catch (e)
          {
            do_throw("exception thrown running task: " + e);
          }
        }
      };
    gThreadManager.currentThread.dispatch(event, Ci.nsIThread.DISPATCH_NORMAL);
  }
function _stageNextTask ( ) { dumpn ( "*** CopyTest(" + this . name + ")._stageNextTask()" ) ; if ( this . _currentTask === this . _tasks . length ) { dumpn ( "*** CopyTest(" + this . name + ") tasks complete!" ) ; return ; } var task = this . _tasks [ this . _currentTask ++ ] ; var self = this ; var event = { run : function run ( ) { try { task ( ) ; } catch ( e ) { do_throw ( "exception thrown running task: " + e ) ; } } } ; gThreadManager . currentThread . dispatch ( event , Ci . nsIThread . DISPATCH_NORMAL ) ; }
Dispatches an event at this thread which will run the next task.
Dispatches an event at this thread which will run the next task .