Bug 207558 - Fix for crashes in WebAccessibilityObjectWrapper after notification updates in IsolatedTree mode.
Summary: Fix for crashes in WebAccessibilityObjectWrapper after notification updates i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-11 09:39 PST by Andres Gonzalez
Modified: 2020-02-11 13:34 PST (History)
10 users (show)

See Also:


Attachments
Patch (22.31 KB, patch)
2020-02-11 09:50 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (17.28 KB, patch)
2020-02-11 11:21 PST, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gonzalez 2020-02-11 09:39:03 PST
Fix for crashes in WebAccessibilityObjectWrapper after notification updates in IsolatedTree mode.
Comment 1 Andres Gonzalez 2020-02-11 09:50:19 PST
Created attachment 390378 [details]
Patch
Comment 2 chris fleizach 2020-02-11 09:54:34 PST
Comment on attachment 390378 [details]
Patch

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

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:802
> +    if (self.axBackingObject)

if (auto backingObject = self.axBackingObject)
   ....

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1956
> +    return Accessibility::retrieveValueFromMainThread<RetainPtr<id>>([protectedSelf = RetainPtr<WebAccessibilityObjectWrapper>(self)] () -> RetainPtr<id> {

should we have a retrieveValueFromMainThreadWithAutorelease function that handles the right casting and release for these kinds of values?
Comment 3 Andres Gonzalez 2020-02-11 11:21:08 PST
Created attachment 390397 [details]
Patch
Comment 4 Andres Gonzalez 2020-02-11 11:23:07 PST
(In reply to chris fleizach from comment #2)
> Comment on attachment 390378 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=390378&action=review
> 
> > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:802
> > +    if (self.axBackingObject)
> 
> if (auto backingObject = self.axBackingObject)
>    ....

Fixed.
> 
> > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1956
> > +    return Accessibility::retrieveValueFromMainThread<RetainPtr<id>>([protectedSelf = RetainPtr<WebAccessibilityObjectWrapper>(self)] () -> RetainPtr<id> {
> 
> should we have a retrieveValueFromMainThreadWithAutorelease function that
> handles the right casting and release for these kinds of values?

Done.
Comment 5 WebKit Commit Bot 2020-02-11 13:33:46 PST
Comment on attachment 390397 [details]
Patch

Clearing flags on attachment: 390397

Committed r256347: <https://trac.webkit.org/changeset/256347>
Comment 6 WebKit Commit Bot 2020-02-11 13:33:47 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2020-02-11 13:34:17 PST
<rdar://problem/59361573>