function waitForAResponse(outputList) {
  // From <https://developer.mozilla.org/en/XPConnect/xpcshell/HOWTO>
  var threadManager = Cc["@mozilla.org/thread-manager;1"]
                      .getService(Ci.nsIThreadManager);
  var mainThread = threadManager.currentThread;
  while (outputList.length == 0) {
    mainThread.processNextEvent(true);
  }
}
// handlers are not preemptible, there shouldn't be any concurrency issues.
handlers are not preemptible, there shouldn't be any concurrency issues.
handlers are not preemptible there shouldn ' t be any concurrency issues .
function waitForAResponse(outputList) {
  var threadManager = Cc["@mozilla.org/thread-manager;1"]
                      .getService(Ci.nsIThreadManager);
  var mainThread = threadManager.currentThread;
  while (outputList.length == 0) {
    mainThread.processNextEvent(true);
  }
}
function waitForAResponse ( outputList ) { var threadManager = Cc [ "@mozilla.org/thread-manager;1" ] . getService ( Ci . nsIThreadManager ) ; var mainThread = threadManager . currentThread ; while ( outputList . length == 0 ) { mainThread . processNextEvent ( true ) ; } }
handlers are not preemptible, there shouldn't be any concurrency issues.
handlers are not preemptible there shouldn ' t be any concurrency issues .
// From <https://developer.mozilla.org/en/XPConnect/xpcshell/HOWTO>