Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Issue 1679773002: WTF::bind: Remove the need of hand-rolled code for bound arguments. (Closed)

Created:
4 years, 10 months ago by Yuta Kitamura
Modified:
4 years, 10 months ago
Reviewers:
haraken, hiroshige, Nico, tzik
CC:
chromium-reviews, blink-reviews, blink-reviews-wtf_chromium.org, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WTF::bind: Remove the need of hand-rolled code for bound arguments. This patch adds a generalized version of PartBoundFunctionImpl for WTF::bind(), and removes the hand-rolled code that contains the repetition for cases with zero to seven bound arguments. The key trick is to use std::tuple<T...> to pass the types of bound parameters. This patch adds a new dependency to base/tuple.h for a simple utility called base::IndexSequence defined there. The bind code lives in WTF, so this should be fine. BUG=565765 Committed: https://crrev.com/2a02e48ea74b0608a2eb43aa935a3cd7dbaea8f2 Cr-Commit-Position: refs/heads/master@{#374319}

Patch Set 1 #

Patch Set 2 : callInternal2() was not necessary. #

Patch Set 3 : Make callInternal() private. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -184 lines) Patch
M third_party/WebKit/Source/wtf/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/Functional.h View 1 2 3 chunks +24 lines, -184 lines 2 comments Download
M third_party/WebKit/Source/wtf/FunctionalTest.cpp View 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1679773002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1679773002/1
4 years, 10 months ago (2016-02-08 05:10:09 UTC) #2
Yuta Kitamura
Hi, here's my most recent template pasta, sprinkled with a lot of three dots... tzik, ...
4 years, 10 months ago (2016-02-08 05:31:17 UTC) #4
Yuta Kitamura
Thanks to tzik, I could further simplify the patch (PS2).
4 years, 10 months ago (2016-02-08 06:29:33 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1679773002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1679773002/20001
4 years, 10 months ago (2016-02-08 06:30:10 UTC) #7
tzik
lgtm
4 years, 10 months ago (2016-02-08 06:31:17 UTC) #8
haraken
LGTM
4 years, 10 months ago (2016-02-08 06:51:00 UTC) #9
hiroshige
great, lgtm!
4 years, 10 months ago (2016-02-08 07:02:57 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1679773002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1679773002/40001
4 years, 10 months ago (2016-02-08 07:56:49 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-08 11:48:54 UTC) #14
Nico
if this lgttzik, it lgtm https://codereview.chromium.org/1679773002/diff/40001/third_party/WebKit/Source/wtf/Functional.h File third_party/WebKit/Source/wtf/Functional.h (right): https://codereview.chromium.org/1679773002/diff/40001/third_party/WebKit/Source/wtf/Functional.h#newcode37 third_party/WebKit/Source/wtf/Functional.h:37: #include <tuple> It's a ...
4 years, 10 months ago (2016-02-09 03:16:53 UTC) #15
Yuta Kitamura
Thanks everyone. (I highly praise tzik-san for becoming an acronym.) https://codereview.chromium.org/1679773002/diff/40001/third_party/WebKit/Source/wtf/Functional.h File third_party/WebKit/Source/wtf/Functional.h (right): https://codereview.chromium.org/1679773002/diff/40001/third_party/WebKit/Source/wtf/Functional.h#newcode37 ...
4 years, 10 months ago (2016-02-09 05:47:43 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1679773002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1679773002/40001
4 years, 10 months ago (2016-02-09 05:48:21 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-09 05:55:15 UTC) #20
commit-bot: I haz the power
4 years, 10 months ago (2016-02-09 05:56:36 UTC) #22
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/2a02e48ea74b0608a2eb43aa935a3cd7dbaea8f2
Cr-Commit-Position: refs/heads/master@{#374319}

Powered by Google App Engine
This is Rietveld 408576698