Greatly simplify CrossThreadTask.h The current implementation predates variadic templates in C++11. Now with C++14 we can get rid of most of this nonsense. There is an additional move constructor call per argument object, which is disappointing. Maybe there's a way to get rid of that and I can't see that way. But compared to two extra copies (which is what we needed up through this morning before I landed http://trac.webkit.org/changeset/201809) we're still way better off.
Created attachment 280837 [details] Patch
Can this use std::index_sequence rather than the homespun GeneratedIndices? For an example usage of it, see WebKit2’s HandleMessage.h.
(In reply to comment #2) > Can this use std::index_sequence rather than the homespun GeneratedIndices? > For an example usage of it, see WebKit2’s HandleMessage.h. Holy crap, yes.
Created attachment 280843 [details] Patch
Yikes on the build failures. Currently exploring why I'm seemingly good locally...
Created attachment 280849 [details] Patch
Created attachment 280852 [details] Patch
Comment on attachment 280852 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=280852&action=review > Source/WTF/wtf/CrossThreadTask.h:80 > +void callMemberFunctionForCrossThreadTaskImpl(C* object, MF function, ArgsTuple&& args, std::index_sequence<ArgsIndex...>) std::index_sequence is quite clever. After enough reading on the web, I actually understand what's happening here.
Comment on attachment 280852 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=280852&action=review > Source/WTF/wtf/CrossThreadTask.h:65 > +template <typename F, typename ArgsTuple, typename ArgsIndicies = std::make_index_sequence<std::tuple_size<ArgsTuple>::value>> The word indices has only two "i"s in it.
Comment on attachment 280852 [details] Patch Clearing flags on attachment: 280852 Committed r201872: <http://trac.webkit.org/changeset/201872>
All reviewed patches have been landed. Closing bug.
(In reply to comment #10) > Comment on attachment 280852 [details] > Patch > > Clearing flags on attachment: 280852 > > Committed r201872: <http://trac.webkit.org/changeset/201872> Fixed the typo in http://trac.webkit.org/changeset/201873