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

Issue 671433004: [gin] Use variadic templates in gin/function_template.h (Closed)

Created:
6 years, 1 month ago by Krzysztof Olczyk
Modified:
6 years, 1 month ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[gin] Use variadic templates in gin/function_template.h Replace pump.py generated gin/function_template.h with variadic template version. This results in a concise code which does not require the use of pump preprocessor. Similar effort for base/callback.h is happening in https://codereview.chromium.org/610423003/ BUG= Committed: https://crrev.com/735c49b6ad67166ccbcc8e3717681bb560fbf1cf Cr-Commit-Position: refs/heads/master@{#301089}

Patch Set 1 #

Patch Set 2 : Added missing exception throwing. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -590 lines) Patch
M gin/function_template.h View 1 4 chunks +70 lines, -346 lines 3 comments Download
D gin/function_template.h.pump View 1 chunk +0 lines, -240 lines 0 comments Download
M gin/wrappable_unittest.cc View 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Krzysztof Olczyk
Hi abarth & jochen, could you please take a look at this CL which intends ...
6 years, 1 month ago (2014-10-23 11:51:05 UTC) #2
jochen (gone - plz use gerrit)
lgtm
6 years, 1 month ago (2014-10-24 11:34:15 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/671433004/20001
6 years, 1 month ago (2014-10-24 11:42:27 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
6 years, 1 month ago (2014-10-24 13:06:16 UTC) #6
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/735c49b6ad67166ccbcc8e3717681bb560fbf1cf Cr-Commit-Position: refs/heads/master@{#301089}
6 years, 1 month ago (2014-10-24 13:07:00 UTC) #7
Aaron Boodman
Cool, this was on my list of things to do. Thanks! https://codereview.chromium.org/671433004/diff/20001/gin/function_template.h File gin/function_template.h (right): ...
6 years, 1 month ago (2014-10-31 22:26:40 UTC) #9
Krzysztof Olczyk
6 years, 1 month ago (2014-11-05 07:50:40 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/671433004/diff/20001/gin/function_template.h
File gin/function_template.h (right):

https://codereview.chromium.org/671433004/diff/20001/gin/function_template.h#...
gin/function_template.h:133: : ok(GetNextArgument(args, create_flags, index ==
0, &value)) {
On 2014/10/31 22:26:40, Aaron Boodman wrote:
> Out of curiosity, since you have |index| already, if we changed gin::Arguments
> to have a getter by index, could we use that and avoid the slighty scary
comment
> about below initialization order?

Yes, we could have probably used the index directly if gin::Arguments supported
it, but it might have complicated the code - taking into account the fact that
we do not directly iterate over gin::Arguments, as some of the arguments can be
gin::Arguments* or v8::Isolate*. 
So, we would have needed to know at which position they were and add adequate
offsets.

Powered by Google App Engine
This is Rietveld 408576698