Bug 59755

Summary: AXObjectCache::attachWrapper() over-retains an AccessibilityObjectWrapper
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: AccessibilityAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Severity: Normal CC: cfleizach, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Description Flags
Patch cfleizach: review+

Description David Kilzer (:ddkilzer) 2011-04-28 16:08:36 PDT
Created attachment 91580 [details]

Reviewed by NOBODY (OOPS!).

Previously, AXObjectCache::attachWrapper over-retained each
AccessibilityObjectWrapper it created, which is why
AXObjectCache::detachWrapper() contained an extra -release.

* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::detachWrapper): Removed extra -release.
(WebCore::AXObjectCache::attachWrapper): Because setWrapper()
assigns to a RetainPtr<> instance variable, it doesn't need a +1
retained object passed in.  Fix the leak by using a RetainPtr<>
for the AccessibilityObjectWrapper.
 2 files changed, 19 insertions(+), 2 deletions(-)
Comment 1 WebKit Review Bot 2011-04-28 16:10:22 PDT
Attachment 91580 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 2 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 2 chris fleizach 2011-04-28 16:31:37 PDT
Comment on attachment 91580 [details]

looks ok, I assume you'll fix the change log. thanks r=me
Comment 3 David Kilzer (:ddkilzer) 2011-04-28 16:55:26 PDT
Committed r85263: <http://trac.webkit.org/changeset/85263>