WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
243456
AX ITM: Avoid dispatching AXIsolatedObject methods to the main thread when it is busy updating the isolated tree.
https://bugs.webkit.org/show_bug.cgi?id=243456
Summary
AX ITM: Avoid dispatching AXIsolatedObject methods to the main thread when it...
Andres Gonzalez
Reported
2022-08-02 08:29:43 PDT
This causes VoiceOver to become irresponsive.
Attachments
Patch
(13.48 KB, patch)
2022-08-02 08:38 PDT
,
Andres Gonzalez
no flags
Details
Formatted Diff
Diff
Patch
(29.65 KB, patch)
2022-08-12 06:53 PDT
,
Andres Gonzalez
andresg_22
: review?
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-08-02 08:29:55 PDT
<
rdar://problem/97982075
>
Andres Gonzalez
Comment 2
2022-08-02 08:38:56 PDT
Created
attachment 461361
[details]
Patch
Darin Adler
Comment 3
2022-08-03 12:39:59 PDT
Comment on
attachment 461361
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=461361&action=review
I didn’t get a chance to review the whole thing, but a couple comments.
> Source/WebCore/accessibility/AccessibilityObjectInterface.h:1695 > +T retrieveValueFromMainThreadWithTimeout(U&& function, Seconds&& timeout)
Since Seconds is a class wrapping a double, we can just use Seconds, we don’t need to use Seconds&&.
> Source/WebCore/accessibility/AccessibilityObjectInterface.h:1708 > + while (!done && !hasElapsed(elapseTime)) { }
This kind of loop is not an efficient way to have one thread wait on another. Surely there is a better idiom for such things using locks, mutexes, or semaphores of some kind.
Andres Gonzalez
Comment 4
2022-08-12 06:53:25 PDT
Created
attachment 461559
[details]
Patch Extended the check for whether to dispatch to the main thread to all AXIsolatedObject methods that were using Accessibility::retrieveValueFromMainThread.
Andres Gonzalez
Comment 5
2022-08-12 06:59:48 PDT
(In reply to Darin Adler from
comment #3
)
> Comment on
attachment 461361
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=461361&action=review
> > I didn’t get a chance to review the whole thing, but a couple comments. > > > Source/WebCore/accessibility/AccessibilityObjectInterface.h:1695 > > +T retrieveValueFromMainThreadWithTimeout(U&& function, Seconds&& timeout) > > Since Seconds is a class wrapping a double, we can just use Seconds, we > don’t need to use Seconds&&.
Fixed.
> > > Source/WebCore/accessibility/AccessibilityObjectInterface.h:1708 > > + while (!done && !hasElapsed(elapseTime)) { } > > This kind of loop is not an efficient way to have one thread wait on > another. Surely there is a better idiom for such things using locks, > mutexes, or semaphores of some kind.
Yes, still working on that. I'm getting deadlocks using BinarySemaphore that I'm still debugging. I'm keeping this for now so that it is testable but not the final version yet. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug