Bug 28278
Summary: | Return type of getRGBColorValue needs to be changed to PassRefPtr to avoid memory leak | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Major | CC: | sam |
Priority: | P3 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | All |
Ryosuke Niwa
CSSPrimitiveValue:: getRGBColorValue creates a new RGBColor object and releases the RefPtr. But the return type is a C pointer so that callers of this function may not necessarily assign it to PassRef, which results in a memory leak.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ryosuke Niwa
Relevant Changeset:
http://trac.webkit.org/changeset/29189
http://trac.webkit.org/changeset/46211
Mark Rowe (bdash)
I fixed this with <http://trac.webkit.org/changeset/47230> and <http://trac.webkit.org/changeset/47232> earlier.
Ryosuke Niwa
(In reply to comment #2)
> I fixed this with <http://trac.webkit.org/changeset/47230> and
> <http://trac.webkit.org/changeset/47232> earlier.
Ah! should have been watching the waterfall. Thanks! This is a great improvement.