Add PassRef and createRefCounted so we can improve creation of RefCounted objects
Created attachment 214367 [details] Patch
Attachment 214367 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WTF/ChangeLog', u'Source/WTF/GNUmakefile.list.am', u'Source/WTF/WTF.vcxproj/WTF.vcxproj', u'Source/WTF/WTF.vcxproj/WTF.vcxproj.filters', u'Source/WTF/WTF.xcodeproj/project.pbxproj', u'Source/WTF/wtf/CMakeLists.txt', u'Source/WTF/wtf/Forward.h', u'Source/WTF/wtf/PassRef.h', u'Source/WTF/wtf/PassRefPtr.h', u'Source/WTF/wtf/Ref.h', u'Source/WTF/wtf/RefPtr.h', u'Source/WTF/wtf/StdLibExtras.h', u'Tools/ChangeLog', u'Tools/TestWebKitAPI/Tests/WTF/Ref.cpp']" exit_code: 1 Source/WTF/wtf/PassRef.h:41: Missing spaces around && [whitespace/operators] [3] Source/WTF/wtf/PassRef.h:127: Missing spaces around && [whitespace/operators] [3] Source/WTF/wtf/StdLibExtras.h:94: reinterpret_cast_ptr is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Source/WTF/wtf/StdLibExtras.h:101: reinterpret_cast_ptr is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 4 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r157520: <http://trac.webkit.org/changeset/157520>
Comment on attachment 214367 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=214367&action=review > Source/WTF/wtf/PassRef.h:185 > +{ Could we use variadic templates instead?
Comment on attachment 214367 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=214367&action=review >> Source/WTF/wtf/PassRef.h:185 >> +{ > > Could we use variadic templates instead? We do. You are have put this comment within the #else side of #if COMPILER_SUPPORTS(CXX_VARIADIC_TEMPLATES) that starts on line 125 above. If you look there you can see the much simpler version using variadic templates for compilers that support it.