if (eq) { PRBool isNative = PR_TRUE;  eq->IsQueueNative(&isNative); if (isNative) mAppShell->ListenToEventQueue(eq, PR_TRUE); } } else if (topic.EqualsWithConversion(gEQDestroyedNotification)) {
if (eq) mAppShell->ListenToEventQueue(eq, PR_TRUE); } else if (topic.Equals(gEQDestroyedNotification)) {
NS_IMETHODIMP nsAppShellService::Observe(nsISupports *aSubject,                                         const PRUnichar *aTopic,                                         const PRUnichar *){  nsAutoString topic(aTopic);  NS_ASSERTION(mAppShell, "appshell service notified before appshell built");  if (topic.EqualsWithConversion(gEQActivatedNotification)) {    nsCOMPtr<nsIEventQueue> eq(do_QueryInterface(aSubject));    if (eq) {      PRBool isNative = PR_TRUE;      // we only add native event queues to the appshell      eq->IsQueueNative(&isNative);      if (isNative)        mAppShell->ListenToEventQueue(eq, PR_TRUE);    }  } else if (topic.EqualsWithConversion(gEQDestroyedNotification)) {    nsCOMPtr<nsIEventQueue> eq(do_QueryInterface(aSubject));    if (eq) {      PRBool isNative = PR_TRUE;      // we only remove native event queues from the appshell      eq->IsQueueNative(&isNative);      if (isNative)        mAppShell->ListenToEventQueue(eq, PR_FALSE);    }  } else if (topic.Equals(gSkinSelectedTopic) ||             topic.Equals(gLocaleSelectedTopic)) {    if (mNativeAppSupport)      mNativeAppSupport->SetIsServerMode(PR_FALSE);  }  return NS_OK;}