event->InitEvent(NS_LITERAL_STRING("DOMPopupBlocked"), PR_TRUE, PR_TRUE);
nsCOMPtr<nsIDOMPopupBlockedEvent> pbev(do_QueryInterface(event)); pbev->InitPopupBlockedEvent(NS_LITERAL_STRING("DOMPopupBlocked"), PR_TRUE, PR_TRUE, aRequestingURI, aPopupURI);
void FirePopupBlockedEvent(nsIDOMDocument* aDoc){  if (aDoc) {    // Fire a "DOMPopupBlocked" event so that the UI can hear about blocked popups.    nsCOMPtr<nsIDOMDocumentEvent> docEvent(do_QueryInterface(aDoc));    nsCOMPtr<nsIDOMEvent> event;    docEvent->CreateEvent(NS_LITERAL_STRING("Events"), getter_AddRefs(event));    if (event) {      event->InitEvent(NS_LITERAL_STRING("DOMPopupBlocked"), PR_TRUE, PR_TRUE);      PRBool noDefault;      nsCOMPtr<nsIDOMEventTarget> targ(do_QueryInterface(aDoc));      targ->DispatchEvent(event, &noDefault);    }  }}