Bug 34309

Summary: MSAA: Crash when posting a notification for a detached object
Product: WebKit Reporter: Jon Honeycutt <jhoneycutt>
Component: AccessibilityAssignee: Jon Honeycutt <jhoneycutt>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Attachments:
Description Flags
patch darin: review+, jhoneycutt: commit-queue-

Description Jon Honeycutt 2010-01-28 22:41:48 PST
A crash occurs when a notification is posted for an object that has been detached from the document.

<rdar://problem/7409759>
Comment 1 Jon Honeycutt 2010-01-29 00:33:08 PST
Created attachment 47687 [details]
patch
Comment 2 Darin Adler 2010-01-29 09:31:24 PST
Comment on attachment 47687 [details]
patch

> +        * accessibility/AccessibilityRenderObject.cpp:
> +        (AccessibilityRenderObject::document):
> +        Null check m_renderer.

I presume this is the bug fix.

> +        * accessibility/win/AXObjectCacheWin.cpp:
> +        (WebCore::AXObjectCache::postPlatformNotification):
> +        Map AXValueChanged to EVENT_OBJECT_VALUECHANGED.

What does this have to do with the bug report? Is it just something else you noticed when making the test case?

I must admit this is one of the largest patches I have ever seen to fix a null-dereference!

r=me
Comment 3 Jon Honeycutt 2010-01-29 12:18:05 PST
(In reply to comment #2)
> (From update of attachment 47687 [details])
> > +        * accessibility/AccessibilityRenderObject.cpp:
> > +        (AccessibilityRenderObject::document):
> > +        Null check m_renderer.
> 
> I presume this is the bug fix.

Yes, this is the fix. I'll mention this in the changelog.

> 
> > +        * accessibility/win/AXObjectCacheWin.cpp:
> > +        (WebCore::AXObjectCache::postPlatformNotification):
> > +        Map AXValueChanged to EVENT_OBJECT_VALUECHANGED.
> 
> What does this have to do with the bug report? Is it just something else you
> noticed when making the test case?

This is required for us to receive the value change event that lets us know that the test passed without crashing. I'll mention that, too.

Thanks for the review!
Comment 4 Jon Honeycutt 2010-01-29 13:56:42 PST
Landed in r54078.