New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 648486 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Replace hand-written callback functions with generated code

Project Member Reported by bashi@chromium.org, Sep 20 2016

Issue description

Currently we have following hand-written callback function bindings:
- PerformanceObserverCallback
- IDBObserverCallback
- IntersectionObserverCallback
- CustomElementConstructor

We should improve our code generator to replace all of above callback functions.

 

Comment 1 by bashi@chromium.org, Sep 20 2016

Blocking: 569301

Comment 2 by bashi@chromium.org, Sep 20 2016

Components: Blink>Bindings
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a14a3854c3e69df4c7d1cb8c460816b54d6199a9

commit a14a3854c3e69df4c7d1cb8c460816b54d6199a9
Author: bashi <bashi@chromium.org>
Date: Tue Sep 27 09:09:30 2016

bindings: Support sequence in callback function arguments

We need to support sequence as IntersectionObserverCallback uses
a sequence.

BUG=648486

Review-Url: https://codereview.chromium.org/2350813005
Cr-Commit-Position: refs/heads/master@{#421154}

[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/core/v8/V8PerformanceObserverCallback.cpp
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/scripts/v8_callback_function.py
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.cpp
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/results/core/V8LongExperimentalCallbackFunction.h
[add] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/results/core/V8StringSequenceCallbackFunctionLongSequenceArg.cpp
[add] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/results/core/V8StringSequenceCallbackFunctionLongSequenceArg.h
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/results/core/V8VoidCallbackFunctionInterfaceArg.cpp
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/results/core/V8VoidCallbackFunctionInterfaceArg.h
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/results/core/V8VoidExperimentalCallbackFunction.cpp
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/bindings/tests/results/core/V8VoidExperimentalCallbackFunction.h
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/core/testing/CallbackFunctionTest.h
[modify] https://crrev.com/a14a3854c3e69df4c7d1cb8c460816b54d6199a9/third_party/WebKit/Source/core/testing/CallbackFunctionTest.idl

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/29552806a635424f888d0f1a11fe853c50c71733

commit 29552806a635424f888d0f1a11fe853c50c71733
Author: bashi <bashi@chromium.org>
Date: Tue Oct 11 00:51:01 2016

Replace hand-written IDBObserverCallback with auto-generated code

Like PerformanceObserverCallback we can auto-generate bindings
for IDBObserverCallback.

BUG=648486

Review-Url: https://codereview.chromium.org/2397363002
Cr-Commit-Position: refs/heads/master@{#424313}

[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/bindings/modules/v8/BUILD.gn
[delete] https://crrev.com/90bf4f0c77709ddb65b1f8d86e04065aacae02ac/third_party/WebKit/Source/bindings/modules/v8/V8IDBObserverCallback.cpp
[delete] https://crrev.com/90bf4f0c77709ddb65b1f8d86e04065aacae02ac/third_party/WebKit/Source/bindings/modules/v8/V8IDBObserverCallback.h
[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/bindings/modules/v8/generated.gni
[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/bindings/modules/v8/v8.gni
[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/bindings/scripts/utilities.py
[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/modules/BUILD.gn
[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/modules/indexeddb/IDBObserver.h
[modify] https://crrev.com/29552806a635424f888d0f1a11fe853c50c71733/third_party/WebKit/Source/modules/indexeddb/IDBObserver.idl
[delete] https://crrev.com/90bf4f0c77709ddb65b1f8d86e04065aacae02ac/third_party/WebKit/Source/modules/indexeddb/IDBObserverCallback.h

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d0ee8a7c7f411bf664af3b87da571f4e09367e4

commit 5d0ee8a7c7f411bf664af3b87da571f4e09367e4
Author: bashi <bashi@chromium.org>
Date: Tue Oct 11 10:34:20 2016

Drop [ExperimentalCallbackFunction]

The code generator will generate bindings for callback functions by default.
Specify [Custom] when hand-written bindings are needed.

BUG=648486

Review-Url: https://codereview.chromium.org/2408083003
Cr-Commit-Position: refs/heads/master@{#424401}

[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/scripts/code_generator.py
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/scripts/idl_types.py
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/scripts/v8_interface.py
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/scripts/v8_types.py
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/idls/modules/TestInterface5.idl
[copy] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp
[add] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.h
[rename] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.cpp
[rename] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.h
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
[rename] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.cpp
[rename] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.h
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/core/dom/Document.idl
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/core/dom/IntersectionObserver.idl
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/core/timing/PerformanceObserver.idl
[modify] https://crrev.com/5d0ee8a7c7f411bf664af3b87da571f4e09367e4/third_party/WebKit/Source/modules/indexeddb/IDBObserver.idl

Comment 6 by bashi@chromium.org, Oct 13 2016

Blocking: -569301
There are two remaining hand-written code but they are not easy to replace so I'd leave them for now.
- IntersectionObserverCallback
- CustomElementConstructor

BTW, I don't think CustomElementConstructor is worth replacing. We can close this issue when IntersectionObserverCallback is replaced.

Sign in to add a comment