RESOLVED FIXED 6094
khtml/css should use RefPtr instead of manual ref() deref()
https://bugs.webkit.org/show_bug.cgi?id=6094
Summary khtml/css should use RefPtr instead of manual ref() deref()
Eric Seidel (no email)
Reported 2005-12-15 02:37:07 PST
khtml/css should use RefPtr instead of manual ref() deref() This patch does just that. (I'm doing each of the khtml sub-directories one at a time to keep these patches small).
Attachments
Proposed patch (22.33 KB, patch)
2005-12-15 02:38 PST, Eric Seidel (no email)
darin: review+
Eric Seidel (no email)
Comment 1 2005-12-15 02:38:37 PST
Created attachment 5085 [details] Proposed patch
Darin Adler
Comment 2 2005-12-15 06:27:06 PST
Comment on attachment 5085 [details] Proposed patch To avoid leaks, getPropertyCSSValue should be changed to return a PassRefPtr rather than a raw pointer. CSSStyleRuleImpl::setDeclaration doesn't need the != check. It can just be a one-liner m_style = style. The changes to CSSPrimitiveValueImpl don't seem like much of an improvement to me. ~CSSProperty should be removed altogether rather than left declared as an empty inline. In this line: RefPtr<CSSMutableStyleDeclarationImpl>dummyStyleDeclaration there's a space missing after the > symbol. But none of these are major issues, it's fine to land as-is if you like.
Note You need to log in before you can comment on or make changes to this bug.