According to Mr.Adler's comment "Itβs not nearly was easy to spot the explicit std::unique_ptr construction and see that it matches up with the release() call. Seems like we should make an adopt function for unique_ptr in WTF so this idiom is more readable.", add adoptUniquePtr and leakUniquePtr.
Created attachment 249306 [details] Patch
Comment on attachment 249306 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249306&action=review I would like to delegate this patch's review to Darin. > Source/WTF/ChangeLog:8 > + make an adopt function and leak function for unique_ptr so that the pair is more readable. Add a new line. > Source/WTF/wtf/StdLibExtras.h:401 > +namespace WTF { "namespace WTF" was already defined in 120 line. Looks like unnecessary namespace definition if this templates are moved into it.
Created attachment 249318 [details] Patch
I wonder if this patch is old enough (due to our neglect) that our C++14 support has made it obsolete?
Comment on attachment 249318 [details] Patch This patch is almost a year old, and doesn't apply cleanly. I'm also not sure it's needed anymore due to the updated compilers in use this year. Can you please confirm it is still needed and upload a new patch if you feel it is still required?