Bug 207558

Summary: Fix for crashes in WebAccessibilityObjectWrapper after notification updates in IsolatedTree mode.
Product: WebKit Reporter: Andres Gonzalez <andresg_22>
Component: New BugsAssignee: Andres Gonzalez <andresg_22>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, cfleizach, commit-queue, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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>