Closed Bug 416753 Opened 18 years ago Closed 18 years ago

Crashes in GetState()

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

Details

(Keywords: access, crash)

Attachments

(1 file)

I have seen at least 1 place where we crash in GetState(), because we now return NS_OK when !mDOMNode, because it's a legitimate time to return EXT_STATE_DEFUNCT http://crash-stats.mozilla.com/report/index/ea728a75-d7eb-11dc-b0be-001a4bd43ed6 We may just be seeing this now because of the fix to bug 381049, and the crash occurs during a call to get_accState(). Also, Marco mentioned that his empty Thunderbird content issue was due to an access violation in get_accState(). So this might be the fix for bug 405951.
Attachment #302509 - Flags: review?(surkov.alexander)
Flags: blocking1.9?
I would add new NS_OK value for defunct state (like we did for NS_OK_NO_ARIA_VALUE) to have unique way of checking.
That would be a big change, can we do that after Firefox 3? I'm not up for it right now :/
(In reply to comment #3) > That would be a big change, can we do that after Firefox 3? I'm not up for it > right now :/ > Ok, then could you file bug for this? ;)
Comment on attachment 302509 [details] [diff] [review] We have fixed some of these before, but apparently missed a few > NS_IMETHODIMP > nsHTML4ButtonAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState) > { >- nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode)); >- NS_ENSURE_TRUE(element, NS_ERROR_FAILURE); // Button accessible shut down >- > nsresult rv = nsHyperTextAccessibleWrap::GetState(aState, aExtraState); > NS_ENSURE_SUCCESS(rv, rv); >+ if (!mDOMNode) >+ return NS_OK; >+ >+ nsCOMPtr<nsIDOMElement> element(do_QueryInterface(mDOMNode)); >+ NS_ENSURE_TRUE(element, NS_ERROR_FAILURE); // Button accessible shut down I think it's overkill. And it seems wrong comment with that addressed r=me
Attachment #302509 - Flags: review?(surkov.alexander) → review+
Attachment #302509 - Flags: approval1.9?
Attachment #302509 - Flags: approval1.9? → approval1.9+
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
I just ran with this patch, and it does not appear to fix my Thunderbird crash from bug 405951 yet.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: