Bug 35000 - [Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes
Summary: [Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P1 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-16 14:54 PST by James Hawkins
Modified: 2010-02-16 19:22 PST (History)
2 users (show)

See Also:


Attachments
[Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes. (2.65 KB, patch)
2010-02-16 14:55 PST, James Hawkins
fishd: review+
fishd: commit-queue-
Details | Formatted Diff | Diff
[Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes. (2.71 KB, patch)
2010-02-16 16:14 PST, James Hawkins
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Hawkins 2010-02-16 14:54:54 PST
releaseRef releases the original pointer without decreasing the reference count, and the base class constructor increases the reference count, leading to a leak.  Attachment will follow.
Comment 1 James Hawkins 2010-02-16 14:55:51 PST
Created attachment 48837 [details]
[Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes.
Comment 2 Darin Fisher (:fishd, Google) 2010-02-16 14:59:33 PST
Comment on attachment 48837 [details]
[Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes.

> Index: WebKit/chromium/ChangeLog
...
> +        Reviewed by NOBODY (OOPS!).
> +
> +        [Chromium] Remove calls to releaseRef when passing PassRefPtrs to base
> +        classes.  releaseRef releases the original pointer without decreasing
> +        the reference count, and the base class constructor increases the
> +        reference count, leading to a leak.
> +
> +        * src/WebDocument.cpp:

Oops, this ChangeLog needs a bug link.  Otherwise, LGTM
Comment 3 James Hawkins 2010-02-16 16:14:46 PST
Created attachment 48846 [details]
[Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes.

Added bug link.
Comment 4 Eric Seidel (no email) 2010-02-16 16:47:21 PST
Comment on attachment 48846 [details]
[Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes.

Yes, this is clearly correct.  Thank you!
Comment 5 WebKit Commit Bot 2010-02-16 19:21:55 PST
Comment on attachment 48846 [details]
[Chromium] Remove calls to releaseRef when passing PassRefPtrs to base classes.

Clearing flags on attachment: 48846

Committed r54861: <http://trac.webkit.org/changeset/54861>
Comment 6 WebKit Commit Bot 2010-02-16 19:22:00 PST
All reviewed patches have been landed.  Closing bug.