if (NULL == aInstancePtr) { return NS_ERROR_NULL_POINTER; }
if (!aInstancePtr) return NS_ERROR_NULL_POINTER;
nsHTMLSelectElement::QueryInterface(REFNSIID aIID, void** aInstancePtr){  if (NULL == aInstancePtr) {    return NS_ERROR_NULL_POINTER;  }  // NS_IMPL_HTML_CONTENT_QUERY_INTERFACE returns mInner as the script object  // We need to be our own so we can implement setprop to set select[i]  if (aIID.Equals(NS_GET_IID(nsIJSScriptObject))) {    *aInstancePtr = (void*)(nsIJSScriptObject*) this;    NS_ADDREF_THIS();    return NS_OK;  }  NS_IMPL_HTML_CONTENT_QUERY_INTERFACE(aIID, aInstancePtr, this)  if (aIID.Equals(NS_GET_IID(nsIDOMHTMLSelectElement))) {    *aInstancePtr = (void*)(nsIDOMHTMLSelectElement*)this;    NS_ADDREF_THIS();    return NS_OK;  }  else if (aIID.Equals(NS_GET_IID(nsIDOMNSHTMLSelectElement))) {    *aInstancePtr = (void*)(nsIDOMNSHTMLSelectElement*)this;    NS_ADDREF_THIS();    return NS_OK;  }  else if (aIID.Equals(NS_GET_IID(nsIFormControl))) {    *aInstancePtr = (void*)(nsIFormControl*)this;    NS_ADDREF_THIS();    return NS_OK;  }  else if (aIID.Equals(NS_GET_IID(nsISelectElement))) {    *aInstancePtr = (void*)(nsISelectElement*) this;    NS_ADDREF_THIS();    return NS_OK;  }  return NS_NOINTERFACE;}