Bug 120501 - Avoid Node references from AXObjectCache from leaking
Summary: Avoid Node references from AXObjectCache from leaking
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: BlinkMergeCandidate, InRadar
Depends on:
Blocks:
 
Reported: 2013-08-29 16:38 PDT by Ryosuke Niwa
Modified: 2013-09-04 08:44 PDT (History)
5 users (show)

See Also:


Attachments
Fixes the bug (3.13 KB, patch)
2013-08-29 17:08 PDT, Ryosuke Niwa
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2013-08-29 16:38:25 PDT
Merge https://chromium.googlesource.com/chromium/blink/+/454f31497613b6d0fbcfb0df757254b64a177c06

A real world example of this would be selecting an <option> item inside frame by keyboard. The node will not be deref()-ed until the topDocument() is detached. 

The issue was that AccessibilityMenuListOption is created in childrenChanged()
hook called when its RenderObject is being destroyed. This patch modifies AccessibilityMenuListPopup so it won't create AccessibilityMenuListOption if its
element is already detached.
Comment 1 Radar WebKit Bug Importer 2013-08-29 16:38:36 PDT
<rdar://problem/14874010>
Comment 2 Ryosuke Niwa 2013-08-29 17:08:20 PDT
Created attachment 210051 [details]
Fixes the bug
Comment 3 Darin Adler 2013-08-29 17:13:47 PDT
Comment on attachment 210051 [details]
Fixes the bug

This seems OK, but I’m really surprised that attached() is the right check to make here. I guess the option elements don’t themselves have renderers? In most cases like this I think we’d check renderer() to see if it’s non-zero.
Comment 4 Ryosuke Niwa 2013-08-29 17:25:30 PDT
+geoff

It's sad that we can't test for the number of leaked documents in WebKit reliably but we can in Blink.
Comment 5 Ryosuke Niwa 2013-08-29 17:26:03 PDT
Committed r154859: <http://trac.webkit.org/changeset/154859>
Comment 6 Geoffrey Garen 2013-09-04 08:44:06 PDT
> It's sad that we can't test for the number of leaked documents in WebKit reliably but we can in Blink.

It's trivial to count the number of live documents. Not sure what you mean by this.