Bug 208996 - Attributes SelectionTextMarkerRange and Start/EndTextMarker need to run on the main thread.
Summary: Attributes SelectionTextMarkerRange and Start/EndTextMarker need to run on th...
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-03-12 07:53 PDT by Andres Gonzalez
Modified: 2020-03-12 13:26 PDT (History)
11 users (show)

See Also:


Attachments
Patch (3.30 KB, patch)
2020-03-12 07:56 PDT, 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-03-12 07:53:55 PDT
Attributes SelectionTextMarkerRange and Start/EndTextMarker need to run on the main thread.
Comment 1 Andres Gonzalez 2020-03-12 07:56:57 PDT
Created attachment 393376 [details]
Patch
Comment 2 WebKit Commit Bot 2020-03-12 12:07:00 PDT
Comment on attachment 393376 [details]
Patch

Clearing flags on attachment: 393376

Committed r258349: <https://trac.webkit.org/changeset/258349>
Comment 3 WebKit Commit Bot 2020-03-12 12:07:01 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2020-03-12 12:07:17 PDT
<rdar://problem/60381174>
Comment 5 Darin Adler 2020-03-12 12:28:13 PDT
Comment on attachment 393376 [details]
Patch

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

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

Maybe we can write this more elegantly using the retainPtr helper function?

    [protectedSelf = retainPtr(self)]
Comment 6 Andres Gonzalez 2020-03-12 13:26:58 PDT
(In reply to Darin Adler from comment #5)
> Comment on attachment 393376 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=393376&action=review
> 
> > Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2830
> > +        return Accessibility::retrieveAutoreleasedValueFromMainThread<id>([protectedSelf = RetainPtr<WebAccessibilityObjectWrapper>(self)] () -> RetainPtr<id> {
> 
> Maybe we can write this more elegantly using the retainPtr helper function?
> 
>     [protectedSelf = retainPtr(self)]

Agree, I'll make a separate change with a sweep through all the instances of this construct. Thanks.