Summary: | AX: Make the generation and update of isolated subtrees asynchronous. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andres Gonzalez <andresg_22> | ||||||||||
Component: | Accessibility | Assignee: | Andres Gonzalez <andresg_22> | ||||||||||
Status: | NEW --- | ||||||||||||
Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, tyler_w, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Attachments: |
|
Description
Andres Gonzalez
2023-06-09 09:14:41 PDT
Created attachment 466651 [details]
Patch
Comment on attachment 466651 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=466651&action=review > Source/WebCore/accessibility/AXObjectCache.cpp:902 > + auto tree = AXIsolatedTree::create(*this, [this] () { When capturing `this` in the completion handler, we should be storing it in a `WeakPtr` or `CheckedPtr` (or RefPtr, but currently you can't make a ref-counted AXObjectCache) to avoid a UAF if the cache gets deleted before the completion handler runs. > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:362 > + auto now = MonotonicTime::now(); I wonder if this should be called something like "start" or "startTime". It might make the comparison below more clear (which currently subtracts "MonotonicTome::now" from "now"). Created attachment 466669 [details]
Patch
(In reply to Tyler Wilcock from comment #3) > Comment on attachment 466651 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=466651&action=review > > > Source/WebCore/accessibility/AXObjectCache.cpp:902 > > + auto tree = AXIsolatedTree::create(*this, [this] () { > > When capturing `this` in the completion handler, we should be storing it in > a `WeakPtr` or `CheckedPtr` (or RefPtr, but currently you can't make a > ref-counted AXObjectCache) to avoid a UAF if the cache gets deleted before > the completion handler runs. Done. > > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:362 > > + auto now = MonotonicTime::now(); > > I wonder if this should be called something like "start" or "startTime". It > might make the comparison below more clear (which currently subtracts > "MonotonicTome::now" from "now"). Renamed. Also added in the new revision the check for Accessibility::waitingForMainThread. Created attachment 468261 [details]
Patch
Created attachment 468262 [details]
Patch
Updating expectation for glib test.
|