WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
239402
AXIsolatedTree::updateNode cannot attach the platform wrapper to the replacement node on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=239402
Summary
AXIsolatedTree::updateNode cannot attach the platform wrapper to the replacem...
Andres Gonzalez
Reported
2022-04-15 14:03:59 PDT
AXIsolatedTree::updateNode cannot attach the platform wrapper to the replacement node on the main thread.
Attachments
Patch
(3.05 KB, patch)
2022-04-15 14:14 PDT
,
Andres Gonzalez
darin
: review+
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-04-15 14:04:09 PDT
<
rdar://problem/91827992
>
Andres Gonzalez
Comment 2
2022-04-15 14:14:02 PDT
Created
attachment 457724
[details]
Patch
Darin Adler
Comment 3
2022-04-15 15:43:29 PDT
Comment on
attachment 457724
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=457724&action=review
> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:299 > - auto change = nodeChangeForObject(axObject, parentID, true); > + auto change = nodeChangeForObject(axObject, parentID, false);
This is why we work so hard to avoid boolean constants. The old code is not obviously wrong. The new code is not obviously right.
Darin Adler
Comment 4
2022-04-15 15:44:02 PDT
Comment on
attachment 457724
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=457724&action=review
> Source/WebCore/ChangeLog:14 > + AXIsolatedTree::updateNode is called for existing IsolatedObjects that > + are being accessed on the AX thread through their platform wrappers. > + For that reason, updateNode cannot attach a new IsolatedObject to the > + same wrapper on the main thread. Instead, the wrapper should be added to > + the NodeChange struct in order to be attached to the IsolatedObject on > + the AX thread.
Can we make a regression test?
Andres Gonzalez
Comment 5
2022-04-16 11:56:14 PDT
(In reply to Darin Adler from
comment #3
)
> Comment on
attachment 457724
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=457724&action=review
> > > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:299 > > - auto change = nodeChangeForObject(axObject, parentID, true); > > + auto change = nodeChangeForObject(axObject, parentID, false); > > This is why we work so hard to avoid boolean constants. The old code is not > obviously wrong. The new code is not obviously right.
Thanks Darin. We are merging this change with the patch for
https://bugs.webkit.org/show_bug.cgi?id=239398
, since they overlap on this code. Added: + enum class AttachWrapper : bool { OnMainThread, OnAXThread }; to make explicit what this parameter means.
Andres Gonzalez
Comment 6
2022-04-16 12:01:47 PDT
(In reply to Darin Adler from
comment #4
)
> Comment on
attachment 457724
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=457724&action=review
> > > Source/WebCore/ChangeLog:14 > > + AXIsolatedTree::updateNode is called for existing IsolatedObjects that > > + are being accessed on the AX thread through their platform wrappers. > > + For that reason, updateNode cannot attach a new IsolatedObject to the > > + same wrapper on the main thread. Instead, the wrapper should be added to > > + the NodeChange struct in order to be attached to the IsolatedObject on > > + the AX thread. > > Can we make a regression test?
The patch in
https://bugs.webkit.org/show_bug.cgi?id=239398
fixes several tests in isolated tree mode. Not sure though that any of those tests covers specifically this issue. This however goes straight to the thread safety of the isolated tree mode, even though it may be difficult to write a layout tests that fails without this change and passes with it.
Darin Adler
Comment 7
2022-04-16 15:06:42 PDT
(In reply to Andres Gonzalez from
comment #6
)
> This however goes straight to the thread safety of > the isolated tree mode, even though it may be difficult to write a layout > tests that fails without this change and passes with it.
Sure, agreed, very important! But the more *important* the fix is, the more value a regression test is. The test helps make sure that a future programmer doesn’t break this. I understand, though, if you can’t think of a good way to make a test.
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