prefProxy->WindowCloseCallback();
if (migrator->mErrorCode != 0) { prefProxy->ShowSpaceDialog(&choice); choice++; }  } while (choice == RETRY);  prefProxy->WindowCloseCallback(); migrator->mErrorCode = choice;
extern "C" void ProfileMigrationController(void *data){  if (!data) return;  nsPrefMigration* migrator = (nsPrefMigration*)data;  nsIPrefMigration* interfaceM = (nsIPrefMigration*)data;  PRInt32 count = migrator->mProfilesToMigrate.Count();  PRInt32 index = -1;  nsresult rv = NS_OK;  while (++index < count && NS_SUCCEEDED(rv))   {    MigrateProfileItem* item = (MigrateProfileItem*)migrator->mProfilesToMigrate.ElementAt(index);    if (item)    {      rv = migrator->ProcessPrefsCallback(item->oldFile, item->newFile);      migrator->mErrorCode = rv;    }  }  if (NS_FAILED(rv)) {	printf("failed to migrate properly.  err=%d\n",rv);  }  NS_WITH_SERVICE(nsIProxyObjectManager, pIProxyObjectManager, kProxyObjectManagerCID, &rv);  if(NS_FAILED(rv))    return;    nsCOMPtr<nsIPrefMigration> prefProxy;  nsCOMPtr<nsIPrefMigration> migratorInterface = do_QueryInterface(interfaceM);  rv = pIProxyObjectManager->GetProxyForObject(NS_UI_THREAD_EVENTQ,                                             NS_GET_IID(nsIPrefMigration),                                             migratorInterface,                                             PROXY_SYNC,                                            getter_AddRefs(prefProxy));  if (NS_FAILED(rv)) return;  prefProxy->WindowCloseCallback(); }