nsAutoString topic; topic.AssignWithConversion(NS_XPCOM_SHUTDOWN_OBSERVER_ID); if (topic.EqualsWithConversion(aTopic)) {
if (!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
nsDOMSOFactory::Observe(nsISupports *aSubject, const PRUnichar *aTopic,                        const PRUnichar *someData){  nsAutoString topic;  topic.AssignWithConversion(NS_XPCOM_SHUTDOWN_OBSERVER_ID);  if (topic.EqualsWithConversion(aTopic)) {    nsCOMPtr<nsIThreadJSContextStack> stack =      do_GetService("@mozilla.org/js/xpc/ContextStack;1");    if (stack) {      JSContext *cx = nsnull;      stack->GetSafeJSContext(&cx);      if (cx) {        // Do one final GC to clean things up before shutdown.        ::JS_GC(cx);      }    }    GlobalWindowImpl::ShutDown();    nsDOMClassInfo::ShutDown();  }  return NS_OK;}