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

Issue 2312093003: Generated bindings for IDL callback functions (Closed)

Created:
4 years, 3 months ago by lkawai
Modified:
4 years, 3 months ago
Reviewers:
haraken, peria, bashi, Yuki
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Generated bindings for IDL callback functions This CL adds bindings generation for callback functions by adding templates and implementing code generator. It also adds tests for callback functions whose arguments and return value are string type. BUG=569301 Committed: https://crrev.com/692903ec763bdfab525f6a104138508557bb9037 Cr-Commit-Position: refs/heads/master@{#419708}

Patch Set 1 #

Patch Set 2 : Changed BUILD.gn #

Total comments: 13

Patch Set 3 : Edited template #

Total comments: 8

Patch Set 4 : Addressed comments #

Patch Set 5 : Did rebase-update #

Total comments: 12

Patch Set 6 : Addressed comments #

Total comments: 72

Patch Set 7 : Addressed comments #

Total comments: 37

Patch Set 8 : Addressed comments #

Patch Set 9 : Changed handling of void #

Patch Set 10 : Addressed win failure #

Total comments: 21

Patch Set 11 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+652 lines, -10 lines) Patch
A third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 3 chunks +11 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/code_generator.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/code_generator_v8.py View 1 2 3 4 5 6 7 8 9 10 3 chunks +41 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/scripts/idl_compiler.py View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/scripts/idl_types.py View 1 2 3 4 5 3 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/scripts.gni View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/utilities.py View 1 2 3 4 5 6 7 3 chunks +13 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/scripts/v8_callback_function.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +63 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_types.py View 1 2 3 4 5 6 7 8 5 chunks +13 lines, -2 lines 0 comments Download
A third_party/WebKit/Source/bindings/templates/callback_function.h View 1 2 3 4 5 6 7 8 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/templates/callback_function.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +61 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/templates.gni View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
A third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.h View 1 2 3 4 5 6 7 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +54 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 6 4 chunks +54 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/tests/results/core/V8VoidExperimentalCallbackFunction.h View 1 2 3 4 5 6 7 1 chunk +50 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/tests/results/core/V8VoidExperimentalCallbackFunction.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +48 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core_idl_files.gni View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/core/testing/CallbackFunctionTest.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +28 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/testing/CallbackFunctionTest.idl View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.idl View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py View 1 2 3 4 5 6 7 3 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 82 (50 generated)
lkawai
PTAL
4 years, 3 months ago (2016-09-07 05:27:08 UTC) #2
lkawai
PTAL
4 years, 3 months ago (2016-09-07 06:25:01 UTC) #7
lkawai
PTAL
4 years, 3 months ago (2016-09-07 08:19:46 UTC) #14
Yuki
https://codereview.chromium.org/2312093003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h File third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h (right): https://codereview.chromium.org/2312093003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h#newcode37 third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h:37: X(Test, Callback) \ Are you really using this private ...
4 years, 3 months ago (2016-09-07 08:27:12 UTC) #15
Yuki
https://codereview.chromium.org/2312093003/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py File third_party/WebKit/Source/bindings/scripts/v8_callback_function.py (right): https://codereview.chromium.org/2312093003/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py#newcode28 third_party/WebKit/Source/bindings/scripts/v8_callback_function.py:28: 'bindings/core/v8/ScopedPersistent.h', I think it's fine to start with copy&pasting, ...
4 years, 3 months ago (2016-09-07 10:04:03 UTC) #18
lkawai
PTAL https://codereview.chromium.org/2312093003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h File third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h (right): https://codereview.chromium.org/2312093003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h#newcode37 third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h:37: X(Test, Callback) \ On 2016/09/07 08:27:12, Yuki wrote: ...
4 years, 3 months ago (2016-09-08 09:11:32 UTC) #19
lkawai
PTAL https://codereview.chromium.org/2312093003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h File third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h (right): https://codereview.chromium.org/2312093003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h#newcode37 third_party/WebKit/Source/bindings/core/v8/V8PrivateProperty.h:37: X(Test, Callback) \ On 2016/09/08 09:11:31, lkawai wrote: ...
4 years, 3 months ago (2016-09-08 09:27:13 UTC) #26
Yuki
https://codereview.chromium.org/2312093003/diff/80001/third_party/WebKit/Source/bindings/scripts/utilities.py File third_party/WebKit/Source/bindings/scripts/utilities.py (right): https://codereview.chromium.org/2312093003/diff/80001/third_party/WebKit/Source/bindings/scripts/utilities.py#newcode185 third_party/WebKit/Source/bindings/scripts/utilities.py:185: def callback_functions(self): s/TODO/TODO(lkawai)/ https://codereview.chromium.org/2312093003/diff/80001/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py File third_party/WebKit/Source/bindings/scripts/v8_callback_function.py (right): https://codereview.chromium.org/2312093003/diff/80001/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py#newcode11 third_party/WebKit/Source/bindings/scripts/v8_callback_function.py:11: ...
4 years, 3 months ago (2016-09-08 10:45:25 UTC) #27
Yuki
Your V8CallbakFunction does not need to take a ScriptState. You should use the function's context. ...
4 years, 3 months ago (2016-09-08 12:10:01 UTC) #30
Yuki
On 2016/09/08 12:10:01, Yuki wrote: > Your V8CallbakFunction does not need to take a ScriptState. ...
4 years, 3 months ago (2016-09-08 16:48:38 UTC) #31
lkawai
PTAL https://codereview.chromium.org/2312093003/diff/80001/third_party/WebKit/Source/bindings/scripts/utilities.py File third_party/WebKit/Source/bindings/scripts/utilities.py (right): https://codereview.chromium.org/2312093003/diff/80001/third_party/WebKit/Source/bindings/scripts/utilities.py#newcode185 third_party/WebKit/Source/bindings/scripts/utilities.py:185: def callback_functions(self): On 2016/09/08 10:45:25, Yuki wrote: > ...
4 years, 3 months ago (2016-09-09 07:56:49 UTC) #34
bashi
https://codereview.chromium.org/2312093003/diff/100001/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html File third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html (right): https://codereview.chromium.org/2312093003/diff/100001/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html#newcode6 third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html:6: var test = internals.callbackFunctionTest(); test -> callbackFunctionTest https://codereview.chromium.org/2312093003/diff/100001/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py File ...
4 years, 3 months ago (2016-09-13 00:35:07 UTC) #37
Yuki
https://codereview.chromium.org/2312093003/diff/100001/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html File third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html (right): https://codereview.chromium.org/2312093003/diff/100001/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html#newcode10 third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html:10: assert_equals(test.testDOMString(callback1), 'SUCCESS: hello, world'); I'd recommend to make testDOMString ...
4 years, 3 months ago (2016-09-14 11:57:23 UTC) #38
peria
please update the description to say what you did and not how you did. https://codereview.chromium.org/2312093003/diff/100001/third_party/WebKit/Source/bindings/scripts/utilities.py ...
4 years, 3 months ago (2016-09-15 01:14:33 UTC) #39
lkawai
PTAL https://codereview.chromium.org/2312093003/diff/100001/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html File third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html (right): https://codereview.chromium.org/2312093003/diff/100001/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html#newcode6 third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html:6: var test = internals.callbackFunctionTest(); On 2016/09/13 00:35:05, bashi1 ...
4 years, 3 months ago (2016-09-16 05:05:52 UTC) #42
peria
looks much better than past PSs. https://codereview.chromium.org/2312093003/diff/120001/third_party/WebKit/Source/bindings/core/v8/BUILD.gn File third_party/WebKit/Source/bindings/core/v8/BUILD.gn (right): https://codereview.chromium.org/2312093003/diff/120001/third_party/WebKit/Source/bindings/core/v8/BUILD.gn#newcode206 third_party/WebKit/Source/bindings/core/v8/BUILD.gn:206: # bindings_core_generated_aggregate_files = ...
4 years, 3 months ago (2016-09-16 05:48:18 UTC) #43
bashi
https://codereview.chromium.org/2312093003/diff/120001/third_party/WebKit/Source/bindings/core/v8/BUILD.gn File third_party/WebKit/Source/bindings/core/v8/BUILD.gn (right): https://codereview.chromium.org/2312093003/diff/120001/third_party/WebKit/Source/bindings/core/v8/BUILD.gn#newcode205 third_party/WebKit/Source/bindings/core/v8/BUILD.gn:205: #if (is_win && is_official_build) { Please remove this. https://codereview.chromium.org/2312093003/diff/120001/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py ...
4 years, 3 months ago (2016-09-16 05:51:19 UTC) #44
lkawai
PTAL https://codereview.chromium.org/2312093003/diff/120001/third_party/WebKit/Source/bindings/core/v8/BUILD.gn File third_party/WebKit/Source/bindings/core/v8/BUILD.gn (right): https://codereview.chromium.org/2312093003/diff/120001/third_party/WebKit/Source/bindings/core/v8/BUILD.gn#newcode205 third_party/WebKit/Source/bindings/core/v8/BUILD.gn:205: #if (is_win && is_official_build) { On 2016/09/16 05:51:18, ...
4 years, 3 months ago (2016-09-16 10:03:20 UTC) #49
lkawai
PTAL
4 years, 3 months ago (2016-09-16 12:12:41 UTC) #52
Yuki
LGTM! But we need to somehow fix or work around the build breakage on Windows. ...
4 years, 3 months ago (2016-09-16 12:16:41 UTC) #55
bashi
LGTM! Thank you for being patient for reviews. Great work! Let's address windows build failures ...
4 years, 3 months ago (2016-09-16 14:16:26 UTC) #58
lkawai
PTAL
4 years, 3 months ago (2016-09-20 02:27:32 UTC) #59
peria
https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/idl_compiler.py File third_party/WebKit/Source/bindings/scripts/idl_compiler.py (right): https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/idl_compiler.py#newcode41 third_party/WebKit/Source/bindings/scripts/idl_compiler.py:41: from code_generator_v8 import CodeGeneratorDictionaryImpl, CodeGeneratorV8, CodeGeneratorUnionType, CodeGeneratorCallbackFunction # pylint: ...
4 years, 3 months ago (2016-09-20 02:47:07 UTC) #64
bashi
On 2016/09/20 02:47:07, peria wrote: > https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/idl_compiler.py > File third_party/WebKit/Source/bindings/scripts/idl_compiler.py (right): > > https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/idl_compiler.py#newcode41 > ...
4 years, 3 months ago (2016-09-20 03:08:50 UTC) #65
peria
On 2016/09/20 03:08:50, bashi1 (slow til Sep 26) wrote: > On 2016/09/20 02:47:07, peria wrote: ...
4 years, 3 months ago (2016-09-20 03:17:09 UTC) #66
haraken
Sorry about the review delay. LGTM with nits. https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/utilities.py File third_party/WebKit/Source/bindings/scripts/utilities.py (right): https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/utilities.py#newcode186 third_party/WebKit/Source/bindings/scripts/utilities.py:186: # ...
4 years, 3 months ago (2016-09-20 07:08:22 UTC) #67
bashi
https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/utilities.py File third_party/WebKit/Source/bindings/scripts/utilities.py (right): https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/utilities.py#newcode186 third_party/WebKit/Source/bindings/scripts/utilities.py:186: # TODO(lkawai): Make callback functions defined in core/ be ...
4 years, 3 months ago (2016-09-20 07:42:58 UTC) #68
lkawai
PTAL https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/idl_compiler.py File third_party/WebKit/Source/bindings/scripts/idl_compiler.py (right): https://codereview.chromium.org/2312093003/diff/180001/third_party/WebKit/Source/bindings/scripts/idl_compiler.py#newcode41 third_party/WebKit/Source/bindings/scripts/idl_compiler.py:41: from code_generator_v8 import CodeGeneratorDictionaryImpl, CodeGeneratorV8, CodeGeneratorUnionType, CodeGeneratorCallbackFunction # ...
4 years, 3 months ago (2016-09-20 08:15:07 UTC) #71
haraken
LGTM
4 years, 3 months ago (2016-09-20 08:53:30 UTC) #72
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2312093003/200001
4 years, 3 months ago (2016-09-20 09:40:28 UTC) #77
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 3 months ago (2016-09-20 09:46:16 UTC) #78
commit-bot: I haz the power
4 years, 3 months ago (2016-09-20 09:49:16 UTC) #80
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/692903ec763bdfab525f6a104138508557bb9037
Cr-Commit-Position: refs/heads/master@{#419708}

Powered by Google App Engine
This is Rietveld 408576698