From 9c28a0db4003216a74f424c24821d9e8a6f5c849 Mon Sep 17 00:00:00 2001 From: Alexander Surkov Date: Thu, 4 Aug 2011 12:57:31 +0900 Subject: [PATCH] Bug 676340 - Crash [@ nsAccessible::NativeState() ] (called by nsXULTextFieldAccessible::GetValue), r=tbsaunde --- accessible/src/xul/nsXULFormControlAccessible.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accessible/src/xul/nsXULFormControlAccessible.cpp b/accessible/src/xul/nsXULFormControlAccessible.cpp index 94b3f42e4f25..5020436b8810 100644 --- a/accessible/src/xul/nsXULFormControlAccessible.cpp +++ b/accessible/src/xul/nsXULFormControlAccessible.cpp @@ -686,6 +686,9 @@ NS_IMPL_ISUPPORTS_INHERITED3(nsXULTextFieldAccessible, nsAccessible, nsHyperText NS_IMETHODIMP nsXULTextFieldAccessible::GetValue(nsAString& aValue) { + if (IsDefunct()) + return NS_ERROR_FAILURE; + PRUint64 state = NativeState(); if (state & states::PROTECTED) // Don't return password text!