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

Issue 2837923003: Make NodeFilter a legacy callback interface. (Closed)

Created:
3 years, 8 months ago by tkent
Modified:
3 years, 7 months ago
Reviewers:
haraken, peria, bashi, Yuki
CC:
blink-reviews, blink-reviews-bindings_chromium.org, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make NodeFilter a legacy callback interface. https://heycam.github.io/webidl/#legacy-callback-interface-object Legacy callback interface needs an interface object, but it has no instances and no prototype. This CL fixes 19 failures in external/wpt/dom/. Implementation: * This CL adds WrapperTypeInfo for NodeFilter, but we never make wrappers for NodeFilter. * Add kWrapperTypeNoPrototype window.NodeFilter should not have a prototype, but it should be a constructor. V8PerContextData::ConstructorForTypeSlowCase() rejected to return a constructor if the type had no prototype. This CL introduces kWrapperTypeNoPrototype to avoid this issue. * Add new legacy_callback_interface.*.tmpl Because NodeFilter can't use generated methods for callback interface for now. * Source/bindings/tests/idls/core/TestLegacyCallbackInterface.idl Add it for quick check of legacy callback interface generation. BUG=591919 Review-Url: https://codereview.chromium.org/2837923003 Cr-Commit-Position: refs/heads/master@{#467963} Committed: https://chromium.googlesource.com/chromium/src/+/bc4bd9dfb5ff6b2f62d3985e3596df27a9bacec0

Patch Set 1 : . #

Total comments: 39

Patch Set 2 : legacy_callback_interface.*.tmpl, etc. #

Total comments: 8

Patch Set 3 : templates.gni, etc. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -157 lines) Patch
M third_party/WebKit/LayoutTests/external/wpt/dom/interfaces-expected.txt View 2 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/global-constructors.html View 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 2 chunks +1 line, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 2 chunks +1 line, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt View 1 2 2 chunks +1 line, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 2 chunks +1 line, -20 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/code_generator_v8.py View 1 2 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/scripts/generate_global_constructors.py View 2 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/utilities.py View 1 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py View 1 2 3 chunks +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_types.py View 1 chunk +0 lines, -1 line 0 comments Download
A third_party/WebKit/Source/bindings/templates/legacy_callback_interface.cpp.tmpl View 1 1 chunk +78 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/templates/legacy_callback_interface.h.tmpl View 1 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl View 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/templates.gni View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/tests/idls/core/TestLegacyCallbackInterface.idl View 1 1 chunk +9 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/tests/results/core/V8TestLegacyCallbackInterface.h View 1 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/bindings/tests/results/core/V8TestLegacyCallbackInterface.cpp View 1 1 chunk +89 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/NodeFilter.h View 1 3 chunks +2 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/dom/NodeFilter.idl View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/bindings/V8PerContextData.cpp View 1 1 chunk +25 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/platform/bindings/WrapperTypeInfo.h View 1 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 43 (27 generated)
tkent
yukishiino@, bashi@, would you review this please?
3 years, 7 months ago (2017-04-27 08:23:18 UTC) #10
bashi
https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/LayoutTests/fast/dom/global-constructors.html File third_party/WebKit/LayoutTests/fast/dom/global-constructors.html (left): https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/LayoutTests/fast/dom/global-constructors.html#oldcode84 third_party/WebKit/LayoutTests/fast/dom/global-constructors.html:84: shouldBe("window.NodeFilter.prototype.isPrototypeOf(nodeFilter)", false); Could you elaborate why removing this is ...
3 years, 7 months ago (2017-04-27 08:49:50 UTC) #11
tkent
https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/LayoutTests/fast/dom/global-constructors.html File third_party/WebKit/LayoutTests/fast/dom/global-constructors.html (left): https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/LayoutTests/fast/dom/global-constructors.html#oldcode84 third_party/WebKit/LayoutTests/fast/dom/global-constructors.html:84: shouldBe("window.NodeFilter.prototype.isPrototypeOf(nodeFilter)", false); On 2017/04/27 at 08:49:49, bashi wrote: > ...
3 years, 7 months ago (2017-04-27 09:15:12 UTC) #12
Yuki
LGTM. https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp File third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp (right): https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp#newcode133 third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp:133: return interface_object; nit: Ideally, we shouldn't skip InstallConditionalFeatures ...
3 years, 7 months ago (2017-04-27 12:18:29 UTC) #16
peria
https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl File third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl (right): https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl#newcode37 third_party/WebKit/Source/bindings/templates/callback_interface.cpp.tmpl:37: TypeErrorConstructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { On 2017/04/27 12:18:29, Yuki wrote: ...
3 years, 7 months ago (2017-04-27 13:14:49 UTC) #17
bashi
https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py File third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py (right): https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py#newcode83 third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py:83: 'methods': [] if is_legacy else [method_context(operation) On 2017/04/27 09:15:12, ...
3 years, 7 months ago (2017-04-27 23:12:33 UTC) #18
tkent
https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py File third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py (right): https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py#newcode83 third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py:83: 'methods': [] if is_legacy else [method_context(operation) On 2017/04/27 at ...
3 years, 7 months ago (2017-04-28 00:09:43 UTC) #19
bashi
https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py File third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py (right): https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py#newcode83 third_party/WebKit/Source/bindings/scripts/v8_callback_interface.py:83: 'methods': [] if is_legacy else [method_context(operation) On 2017/04/28 00:09:43, ...
3 years, 7 months ago (2017-04-28 00:59:09 UTC) #20
tkent
https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp File third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp (right): https://codereview.chromium.org/2837923003/diff/20001/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp#newcode133 third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp:133: return interface_object; On 2017/04/27 at 12:18:28, Yuki wrote: > ...
3 years, 7 months ago (2017-04-28 06:13:37 UTC) #21
bashi
Thank you so much for addressing comments! lgtm on my side. https://codereview.chromium.org/2837923003/diff/40001/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py File third_party/WebKit/Source/bindings/scripts/code_generator_v8.py (right): ...
3 years, 7 months ago (2017-04-28 06:28:34 UTC) #24
bashi
https://codereview.chromium.org/2837923003/diff/40001/third_party/WebKit/Source/bindings/templates/legacy_callback_interface.cpp.tmpl File third_party/WebKit/Source/bindings/templates/legacy_callback_interface.cpp.tmpl (right): https://codereview.chromium.org/2837923003/diff/40001/third_party/WebKit/Source/bindings/templates/legacy_callback_interface.cpp.tmpl#newcode1 third_party/WebKit/Source/bindings/templates/legacy_callback_interface.cpp.tmpl:1: {% filter format_blink_cpp_source_code %} Sorry forgot to mention that ...
3 years, 7 months ago (2017-04-28 06:39:05 UTC) #26
tkent
https://codereview.chromium.org/2837923003/diff/40001/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py File third_party/WebKit/Source/bindings/scripts/code_generator_v8.py (right): https://codereview.chromium.org/2837923003/diff/40001/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py#newcode184 third_party/WebKit/Source/bindings/scripts/code_generator_v8.py:184: if interface.is_callback and len(interface.constants) > 0: On 2017/04/28 at ...
3 years, 7 months ago (2017-04-28 09:22:02 UTC) #33
Yuki
LGTM.
3 years, 7 months ago (2017-04-28 10:34:12 UTC) #34
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/2837923003/80001
3 years, 7 months ago (2017-04-28 11:59:26 UTC) #39
commit-bot: I haz the power
Committed patchset #3 (id:80001) as https://chromium.googlesource.com/chromium/src/+/bc4bd9dfb5ff6b2f62d3985e3596df27a9bacec0
3 years, 7 months ago (2017-04-28 12:03:58 UTC) #42
haraken
3 years, 7 months ago (2017-04-28 13:44:31 UTC) #43
Message was sent while issue was closed.
LGTM

Powered by Google App Engine
This is Rietveld 408576698