Bug 106942 - AX: Removing a node from AXObjectCache should not happen in destructor
Summary: AX: Removing a node from AXObjectCache should not happen in destructor
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-01-15 13:28 PST by Dominic Mazzoni
Modified: 2014-02-07 11:23 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Mazzoni 2013-01-15 13:28:31 PST
When a Node is deleted, AXObjectCache has to be notified so it doesn't have any stale references to that object. However, doing that in the Node destructor is problematic - in particular, it needs some hacks so that it can be called at different times in ContainerNode's destructor vs Node's destructor.

Instead, this should be called in another method of Node that always gets called before the destructor.

Let's add an assertion in debug mode that ensures this method always got called.
Comment 1 Alexey Proskuryakov 2013-01-15 13:32:49 PST
See also: bug 106106. If the current patch in that bug gets landed, it will need to be reverted here, too.
Comment 2 Dominic Mazzoni 2013-01-15 15:07:55 PST
Hmmm, unfortunately it looks like Node::removedFrom is called *after* a node has been removed from the tree...is there any method we can hook into that will be called before a node is removed, so that the accessibility code can walk the parent chain and handle live region updates?
Comment 3 Alexey Proskuryakov 2013-01-15 22:44:16 PST
How about Document::nodeWillBeRemoved()?
Comment 4 Radar WebKit Bug Importer 2014-02-07 11:23:15 PST
<rdar://problem/16013958>