for (i = 2; (uint)i < argc; i++) {
for (i = 2; (PRUint32)i < argc; i++) {
GlobalWindowImpl::SetTimeoutOrInterval(JSContext *cx,                                       jsval *argv,                                        PRUint32 argc,                                        PRInt32* aReturn,                                       PRBool aIsInterval){  char *expr = nsnull;  JSObject *funobj = nsnull;  JSString *str;  nsTimeoutImpl *timeout, **insertion_point;  jsdouble interval;  PRInt64 now, delta;  if (argc >= 2) {    if (!JS_ValueToNumber(cx, argv[1], &interval)) {      JS_ReportError(cx, "Second argument to %s must be a millisecond interval",                     aIsInterval ? kSetIntervalStr : kSetTimeoutStr);      return NS_ERROR_ILLEGAL_VALUE;    }    switch (JS_TypeOfValue(cx, argv[0])) {      case JSTYPE_FUNCTION:        funobj = JSVAL_TO_OBJECT(argv[0]);        break;      case JSTYPE_STRING:      case JSTYPE_OBJECT:        if (!(str = JS_ValueToString(cx, argv[0])))            return NS_ERROR_FAILURE;        expr = PL_strdup(JS_GetStringBytes(str));        if (nsnull == expr)            return NS_ERROR_OUT_OF_MEMORY;        break;      default:        JS_ReportError(cx, "useless %s call (missing quotes around argument?)", aIsInterval ? kSetIntervalStr : kSetTimeoutStr);        return NS_ERROR_FAILURE;    }    timeout = PR_NEWZAP(nsTimeoutImpl);    if (nsnull == timeout) {      PR_FREEIF(expr);      return NS_ERROR_OUT_OF_MEMORY;    }    // Initial ref_count to indicate that this timeout struct will    // be held as the closure of a timer.    timeout->ref_count = 1;    if (aIsInterval)        timeout->interval = (PRInt32)interval;    timeout->expr = expr;    timeout->funobj = funobj;    if (expr) {      timeout->argv = 0;      timeout->argc = 0;    }     else {      int i;      /* Leave an extra slot for a secret final argument that         indicates to the called function how "late" the timeout is. */      timeout->argv = (jsval *)PR_MALLOC((argc - 1) * sizeof(jsval));      if (nsnull == timeout->argv) {        DropTimeout(timeout);        return NS_ERROR_OUT_OF_MEMORY;      }      if (!JS_AddNamedRoot(cx, &timeout->funobj, "timeout.funobj")) {        DropTimeout(timeout);        return NS_ERROR_FAILURE;      }            timeout->argc = 0;      for (i = 2; (uint)i < argc; i++) {        timeout->argv[i - 2] = argv[i];        if (!JS_AddNamedRoot(cx, &timeout->argv[i - 2], "timeout.argv[i]")) {          DropTimeout(timeout);          return NS_ERROR_FAILURE;        }        timeout->argc++;      }    }        LL_I2L(now, PR_IntervalNow());    LL_D2L(delta, PR_MillisecondsToInterval((PRUint32)interval));    LL_ADD(timeout->when, now, delta);    nsresult err = NS_NewTimer(&timeout->timer);    if (NS_OK != err) {      DropTimeout(timeout);      return err;    }         err = timeout->timer->Init(nsGlobalWindow_RunTimeout, timeout,                                (PRInt32)interval);    if (NS_OK != err) {      DropTimeout(timeout);      return err;    }     timeout->window = this;    NS_ADDREF(this);    if (mTimeoutInsertionPoint == NULL)        insertion_point = &mTimeouts;    else        insertion_point = mTimeoutInsertionPoint;    InsertTimeoutIntoList(insertion_point, timeout);    timeout->public_id = ++mTimeoutPublicIdCounter;    *aReturn = timeout->public_id;  }  else {    JS_ReportError(cx, "Function %s requires at least 2 parameters", aIsInterval ? kSetIntervalStr : kSetTimeoutStr);    return NS_ERROR_FAILURE;  }    return NS_OK;}