nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID));
AlertMissingFonts(nsString& aMissingFonts){  nsCOMPtr<nsIStringBundleService> sbs(do_GetService(NS_STRINGBUNDLE_CONTRACTID));  if (!sbs)    return;  nsCOMPtr<nsIStringBundle> sb;  sbs->CreateBundle("resource:/res/fonts/mathfont.properties", getter_AddRefs(sb));  if (!sb)    return;  nsXPIDLString title, message;  const PRUnichar* strings[] = { aMissingFonts.get() };  sb->GetStringFromName(NS_LITERAL_STRING("mathfont_missing_dialog_title").get(), getter_Copies(title));  sb->FormatStringFromName(NS_LITERAL_STRING("mathfont_missing_dialog_message").get(),                           strings, 1, getter_Copies(message));  nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));  if (!wwatch)    return;  nsCOMPtr<nsIDialogParamBlock> paramBlock(do_CreateInstance("@mozilla.org/embedcomp/dialogparam;1"));  if (!paramBlock)    return;  // copied from nsICommonDialogs.idl which curiously isn't part of the build  // (mozilla/xpfe/appshell/public/nsICommonDialogs.idl)  enum {eMsg=0, eCheckboxMsg=1, eIconClass=2, eTitleMessage=3, eEditfield1Msg=4,        eEditfield2Msg=5, eEditfield1Value=6, eEditfield2Value=7, eButton0Text=8,        eButton1Text=9, eButton2Text=10, eButton3Text=11,eDialogTitle=12};  enum {eButtonPressed=0, eCheckboxState=1, eNumberButtons=2, eNumberEditfields=3,        eEditField1Password=4};  paramBlock->SetInt(eNumberButtons, 1);  paramBlock->SetString(eIconClass, NS_LITERAL_STRING("alert-icon").get());  paramBlock->SetString(eDialogTitle, title.get());  paramBlock->SetString(eMsg, message.get());  nsCOMPtr<nsIDOMWindow> parent;  wwatch->GetActiveWindow(getter_AddRefs(parent));  nsCOMPtr<nsIDOMWindow> dialog;  wwatch->OpenWindow(parent, "chrome://global/content/commonDialog.xul", "_blank",                     "dependent,centerscreen,chrome,titlebar", paramBlock,                     getter_AddRefs(dialog));}