DispatchMessage(&msg);
nsToolkit::nsDispatchMessage(&msg);
void RunPump(void* arg){    ThreadInitInfo *info = (ThreadInitInfo*)arg;    ::PR_EnterMonitor(info->monitor);#ifdef MOZ_AIMM    // Start Active Input Method Manager on this thread    if(nsToolkit::gAIMMApp)        nsToolkit::gAIMMApp->Activate(TRUE);#endif    // do registration and creation in this thread    info->toolkit->CreateInternalWindow(PR_GetCurrentThread());    gThreadState = PR_TRUE;    ::PR_Notify(info->monitor);    ::PR_ExitMonitor(info->monitor);    delete info;    // Process messages    MSG msg;    while (GetMessage(&msg, NULL, 0, 0)) {        TranslateMessage(&msg);        DispatchMessage(&msg);    }}