Bug 380412 - loading ajax pages reliable craches, r=aaronlev

This commit is contained in:
surkov.alexander@gmail.com 2007-05-14 22:12:50 -07:00
parent f5f32a1a38
commit 386c331ac3

View File

@ -928,6 +928,11 @@ NS_IMETHODIMP
nsAccessibilityService::GetAccessibleFor(nsIDOMNode *aNode, nsAccessibilityService::GetAccessibleFor(nsIDOMNode *aNode,
nsIAccessible **aAccessible) nsIAccessible **aAccessible)
{ {
NS_ENSURE_ARG_POINTER(aAccessible);
*aAccessible = nsnull;
NS_ENSURE_ARG(aNode);
// We use presentation shell #0 because we assume that is presentation of // We use presentation shell #0 because we assume that is presentation of
// given node window. // given node window.
nsCOMPtr<nsIContent> content(do_QueryInterface(aNode)); nsCOMPtr<nsIContent> content(do_QueryInterface(aNode));
@ -968,6 +973,12 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessibleInWindow(nsIDOMNode *aNode,
nsIDOMWindow *aWin, nsIDOMWindow *aWin,
nsIAccessible **aAccessible) nsIAccessible **aAccessible)
{ {
NS_ENSURE_ARG_POINTER(aAccessible);
*aAccessible = nsnull;
NS_ENSURE_ARG(aNode);
NS_ENSURE_ARG(aWin);
nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(aWin)); nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(aWin));
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(webNav)); nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(webNav));
if (!docShell) if (!docShell)
@ -982,6 +993,12 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessibleInShell(nsIDOMNode *aNode,
nsIPresShell *aPresShell, nsIPresShell *aPresShell,
nsIAccessible **aAccessible) nsIAccessible **aAccessible)
{ {
NS_ENSURE_ARG_POINTER(aAccessible);
*aAccessible = nsnull;
NS_ENSURE_ARG(aNode);
NS_ENSURE_ARG(aPresShell);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell)); nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsIFrame *outFrameUnused = NULL; nsIFrame *outFrameUnused = NULL;
PRBool isHiddenUnused = false; PRBool isHiddenUnused = false;
@ -993,6 +1010,12 @@ NS_IMETHODIMP nsAccessibilityService::GetAccessibleInWeakShell(nsIDOMNode *aNode
nsIWeakReference *aWeakShell, nsIWeakReference *aWeakShell,
nsIAccessible **aAccessible) nsIAccessible **aAccessible)
{ {
NS_ENSURE_ARG_POINTER(aAccessible);
*aAccessible = nsnull;
NS_ENSURE_ARG(aNode);
NS_ENSURE_ARG(aWeakShell);
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(aWeakShell)); nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(aWeakShell));
nsIFrame *outFrameUnused = NULL; nsIFrame *outFrameUnused = NULL;
PRBool isHiddenUnused = false; PRBool isHiddenUnused = false;