static PLEventQueue * _pl_CreateEventQueue(char *name,
static PLEventQueue * _pl_CreateEventQueue(const char *name,
static PLEventQueue * _pl_CreateEventQueue(char *name,                                           PRThread *handlerThread,                                           EventQueueType  qtype){    PRStatus err;    PLEventQueue* self = NULL;    PRMonitor* mon = NULL;    if (event_lm == NULL)        event_lm = PR_NewLogModule("event");    self = PR_NEWZAP(PLEventQueue);    if (self == NULL) return NULL;    mon = PR_NewNamedMonitor(name);    if (mon == NULL) goto error;    self->name = name;    self->monitor = mon;    self->handlerThread = handlerThread;    self->processingEvents = PR_FALSE;    self->type = qtype;#if defined(_WIN32)     self->timerSet = PR_FALSE;#endif#if defined(_WIN32) || defined(XP_OS2)    self->removeMsg = PR_TRUE;#endif#if defined(MAC_USE_WAKEUPPROCESS)    self->psn.lowLongOfPSN = kNoProcess;#endif    self->notified = PR_FALSE;    PR_INIT_CLIST(&self->queue);    if ( qtype == EventQueueIsNative ) {        err = _pl_SetupNativeNotifier(self);        if (err) goto error;        _md_CreateEventQueue( self );    }    return self;  error:    if (mon != NULL)        PR_DestroyMonitor(mon);    PR_DELETE(self);    return NULL;} 