GetDocument(*getter_AddRefs(document));
GetDocument(getter_AddRefs(document));
nsHTMLSelectElement::DispatchDOMEvent(const nsAString& aName){  nsCOMPtr<nsIDocument> document;  GetDocument(*getter_AddRefs(document));  nsCOMPtr<nsIDOMDocumentEvent> domDoc = do_QueryInterface(document);  if (domDoc) {    nsCOMPtr<nsIDOMEvent> selectEvent;    domDoc->CreateEvent(NS_LITERAL_STRING("Events"), getter_AddRefs(selectEvent));    if (selectEvent) {      selectEvent->InitEvent(aName, PR_TRUE, PR_TRUE);      nsCOMPtr<nsIDOMEventTarget> target(do_QueryInterface(NS_STATIC_CAST(nsIDOMNode*, this)));      PRBool noDefault;      target->DispatchEvent(selectEvent, &noDefault);    }  }}