Bug 661998 - Fix risky use of nsITimer in xpcshell test. r=gavin

This commit is contained in:
Josh Matthews 2011-06-07 04:45:36 -04:00
parent d2da8f5e6c
commit 0bb92cb891

View File

@ -117,7 +117,7 @@ AuthPrompt2.prototype = {
try {
var me = this;
var allOverAndDead = false;
runLater(function() {
do_execute_soon(function() {
try {
if (allOverAndDead)
throw "already canceled";
@ -156,12 +156,6 @@ Cancelable.prototype = {
}
};
function runLater(func)
{
var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
timer.initWithCallback(func, 0, Ci.nsITimer.TYPE_ONE_SHOT);
}
function Requestor(proxyFlags, hostFlags) {
this.proxyFlags = proxyFlags;
this.hostFlags = hostFlags;