[webkit-reviews] review granted: [Bug 44874] Handle MediaQueryExp memory management exclusively with smart pointers : [Attachment 65922] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 30 09:26:38 PDT 2010


Darin Adler <darin at apple.com> has granted Maciej Stachowiak <mjs at apple.com>'s
request for review:
Bug 44874: Handle MediaQueryExp memory management exclusively with smart
pointers
https://bugs.webkit.org/show_bug.cgi?id=44874

Attachment 65922: Patch
https://bugs.webkit.org/attachment.cgi?id=65922&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
I think we can use Vector<OwnPtr> almost everywhere we do deleteAllValues.

> +inline PassOwnPtr<MediaQueryExp> MediaQueryExp::create(const AtomicString&
mediaFeature, CSSParserValueList* values)
> +{
> +    return adoptPtr(new MediaQueryExp(mediaFeature, values));
> +}

The pattern I've been using on these is to put the create function into the
.cpp file and marking the constructor inline. I think this results in the same
amount of function call overhead, and more code sharing between call sites of
the create function.

r=me


More information about the webkit-reviews mailing list