Bug 122600 - [ATK] Missing checks in returnIfWebKitAccessibleIsInvalid
Summary: [ATK] Missing checks in returnIfWebKitAccessibleIsInvalid
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-10-10 08:09 PDT by Mario Sanchez Prada
Modified: 2013-10-10 09:18 PDT (History)
7 users (show)

See Also:


Attachments
Patch proposal (3.09 KB, patch)
2013-10-10 08:15 PDT, Mario Sanchez Prada
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Sanchez Prada 2013-10-10 08:09:22 PDT
Besides checking if an ATK wrapper has been detached to determine whether it's invalid or not, we also need to check if the coreObject's document is null, since that might have been invalidated even before we called any function of the ATK API.

Actually, this additional check can save us from calling updateBackingStore, so bonus points
Comment 1 Radar WebKit Bug Importer 2013-10-10 08:09:45 PDT
<rdar://problem/15197317>
Comment 2 Mario Sanchez Prada 2013-10-10 08:15:08 PDT
Created attachment 213886 [details]
Patch proposal
Comment 3 chris fleizach 2013-10-10 08:51:50 PDT
Comment on attachment 213886 [details]
Patch proposal

View in context: https://bugs.webkit.org/attachment.cgi?id=213886&action=review

> Source/WebCore/accessibility/atk/WebKitAccessibleUtil.h:46
>          if (webkitAccessibleIsDetached(webkitAccessible)) \

does webkitAccessibleIsDetached also check if the document is null?
Comment 4 Mario Sanchez Prada 2013-10-10 08:55:40 PDT
(In reply to comment #3)
> (From update of attachment 213886 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=213886&action=review
> 
> > Source/WebCore/accessibility/atk/WebKitAccessibleUtil.h:46
> >          if (webkitAccessibleIsDetached(webkitAccessible)) \
> 
> does webkitAccessibleIsDetached also check if the document is null?

No. Only if the wrapped object is no longer a valid AccessibilityObject
Comment 5 WebKit Commit Bot 2013-10-10 09:18:20 PDT
Comment on attachment 213886 [details]
Patch proposal

Clearing flags on attachment: 213886

Committed r157227: <http://trac.webkit.org/changeset/157227>
Comment 6 WebKit Commit Bot 2013-10-10 09:18:22 PDT
All reviewed patches have been landed.  Closing bug.