if(mService) mService->PushThreadEventQueue(getter_AddRefs(mQueue)); return mQueue ? NS_OK : NS_ERROR_FAILURE;
if (!mService) return NS_ERROR_FAILURE;   mService->PushThreadEventQueue(getter_AddRefs(mQueue)); if (!mQueue) return NS_ERROR_FAILURE;  #ifdef HAVE_LAME_APPSHELL  mAppShell = do_CreateInstance(kAppShellCID); if (!mAppShell) return NS_ERROR_FAILURE;  mAppShell->Create(0, nsnull); mAppShell->Spinup();   mAppShell->ListenToEventQueue(mQueue, PR_TRUE); #endif  return NS_OK;
nsresult EventQueueAutoPopper::Push(){  if (mQueue) // only once    return NS_ERROR_FAILURE;  mService = do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID);  if(mService)    mService->PushThreadEventQueue(getter_AddRefs(mQueue));  return mQueue ? NS_OK : NS_ERROR_FAILURE; }