Bug 59755 - AXObjectCache::attachWrapper() over-retains an AccessibilityObjectWrapper
Summary: AXObjectCache::attachWrapper() over-retains an AccessibilityObjectWrapper
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-28 16:08 PDT by David Kilzer (:ddkilzer)
Modified: 2011-04-28 16:55 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.05 KB, patch)
2011-04-28 16:08 PDT, David Kilzer (:ddkilzer)
cfleizach: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2011-04-28 16:08:36 PDT
Created attachment 91580 [details]
Patch

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]
Patch

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>