[webkit-reviews] review granted: [Bug 129828] Use OwnPtr in StructureIDTable : [Attachment 226040] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 6 14:39:45 PST 2014


Geoffrey Garen <ggaren at apple.com> has granted Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 129828: Use OwnPtr in StructureIDTable
https://bugs.webkit.org/show_bug.cgi?id=129828

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

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=226040&action=review


r=me

> Source/JavaScriptCore/runtime/StructureIDTable.cpp:50
>      StructureOrOffset* newTable = new StructureOrOffset[newCapacity];

You should use OwnPtr here.

> Source/JavaScriptCore/runtime/StructureIDTable.cpp:59
> +    StructureOrOffset* oldTable = m_table.leakPtr();

You should use PassOwnPtr here.

Another option is plain old swap.


More information about the webkit-reviews mailing list