This reduces the amount of boilerplate, plus fixes a memory leak :-(
<rdar://problem/16246441>
Created attachment 226040 [details] Patch
Comment on attachment 226040 [details] Patch 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.
Committed r165265: <http://trac.webkit.org/changeset/165265>
Comment on attachment 226040 [details] Patch Clearing review flag.
In new code, please use std::unique_ptr instead of OwnPtr, which we are planning to deprecate and delete.