if (aIID.Equals(NS_GET_IID(nsIAccessible))) { nsresult rv = NS_OK; NS_WITH_SERVICE(nsIAccessibilityService, accService, "@mozilla.org/accessibilityService;1", &rv); if (accService) { nsCOMPtr<nsIDOMNode> node = do_QueryInterface(mContent); nsIAccessible* acc = nsnull; accService->CreateHTMLIFrameAccessible(node, mPresContext, &acc); NS_IF_ADDREF(acc); *aInstancePtr = acc; return NS_OK; } return NS_ERROR_FAILURE; }
nsHTMLFrameOuterFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr){  NS_PRECONDITION(0 != aInstancePtr, "null ptr");  if (NULL == aInstancePtr) {    return NS_ERROR_NULL_POINTER;  }  if (aIID.Equals(NS_GET_IID(nsIAccessible))) {    nsresult rv = NS_OK;    NS_WITH_SERVICE(nsIAccessibilityService, accService, "@mozilla.org/accessibilityService;1", &rv);    if (accService) {     nsCOMPtr<nsIDOMNode> node = do_QueryInterface(mContent);     nsIAccessible* acc = nsnull;     accService->CreateHTMLIFrameAccessible(node, mPresContext, &acc);     NS_IF_ADDREF(acc);     *aInstancePtr = acc;     return NS_OK;    }    return NS_ERROR_FAILURE;  }   return nsHTMLFrameOuterFrameSuper::QueryInterface(aIID, aInstancePtr);}