XPCOMExitRoutine func = (XPCOMExitRoutine) gExitRoutines.ElementAt(i);
XPCOMExitRoutine func = (XPCOMExitRoutine) gExitRoutines->ElementAt(i);
static void CallExitRoutines(){    PRInt32 count = gExitRoutines.Count();    for (PRInt32 i = 0; i < count; i++) {        XPCOMExitRoutine func = (XPCOMExitRoutine) gExitRoutines.ElementAt(i);        func();    }    gExitRoutines.Clear();}