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

Issue 284163002: Better arity checks for overloads (Closed)

Created:
6 years, 7 months ago by Nils Barth (inactive)
Modified:
6 years, 7 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Visibility:
Public.

Description

Better arity checks for overloads Overloaded methods have multiple valid argument lengths, not a single minium. E.g., if valid lengths are 0 or 2, and there is 1 argument provided, this should be a length error. Now that we have a switch by length, we can easily handle this! R=haraken Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174168

Patch Set 1 #

Patch Set 2 : Rebased #

Patch Set 3 : Rebased #

Patch Set 4 : Revised, only report arities if gap #

Patch Set 5 : Rebaseline tests #

Patch Set 6 : Return properly #

Unified diffs Side-by-side diffs Delta from patch set Stats (+325 lines, -244 lines) Patch
M LayoutTests/fast/canvas/canvas-overloads-drawImage-expected.txt View 1 2 3 4 5 1 chunk +12 lines, -12 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-overloads-setFillColor-expected.txt View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-overloads-setShadow-expected.txt View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-overloads-setStrokeColor-expected.txt View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js View 1 2 3 4 1 chunk +17 lines, -23 lines 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-overloads-setFillColor.js View 1 2 3 4 1 chunk +3 lines, -9 lines 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-overloads-setShadow.js View 1 2 3 4 1 chunk +7 lines, -13 lines 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-overloads-setStrokeColor.js View 1 2 3 4 1 chunk +3 lines, -9 lines 0 comments Download
M LayoutTests/fast/canvas/webgl/script-tests/texImageTest.js View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/canvas/webgl/texImageTest-expected.txt View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/fast/js/select-options-remove-expected.txt View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/vibration/vibration-exceptions-expected.txt View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 2 3 1 chunk +8 lines, -3 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 2 3 4 5 1 chunk +12 lines, -6 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 4 5 5 chunks +32 lines, -13 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface2.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor3.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceGarbageCollected.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 3 93 chunks +141 lines, -101 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperations.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M Source/bindings/v8/ExceptionMessages.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/v8/ExceptionMessages.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8Binding.h View 1 chunk +6 lines, -3 lines 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 1 chunk +19 lines, -3 lines 0 comments Download
M Source/bindings/v8/custom/V8ElementCustom.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/v8/custom/V8SubtleCryptoCustom.cpp View 1 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Nils Barth (inactive)
I noticed that we can improve arity checking!
6 years, 7 months ago (2014-05-15 06:08:50 UTC) #1
haraken
+mkwst LGTM.
6 years, 7 months ago (2014-05-15 06:14:30 UTC) #2
Nils Barth (inactive)
(Rebased, will commit after constructors land.)
6 years, 7 months ago (2014-05-16 05:37:52 UTC) #3
Mike West
Code change LGTM. I'm a bit surprised that this didn't change any layout test results, ...
6 years, 7 months ago (2014-05-16 06:35:54 UTC) #4
Nils Barth (inactive)
On 2014/05/16 06:35:54, Mike West wrote: > Code change LGTM. I'm a bit surprised that ...
6 years, 7 months ago (2014-05-16 07:58:13 UTC) #5
Nils Barth (inactive)
Revised so now has simple error reporting if possible, which yields much more legible error ...
6 years, 7 months ago (2014-05-16 08:30:41 UTC) #6
Mike West
Patchset #4 LGTM, thanks for the explanation! -mike
6 years, 7 months ago (2014-05-16 08:36:42 UTC) #7
Nils Barth (inactive)
On 2014/05/16 08:30:41, Nils Barth wrote: > Revised so now has simple error reporting if ...
6 years, 7 months ago (2014-05-16 11:19:36 UTC) #8
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 7 months ago (2014-05-16 11:19:44 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/284163002/80001
6 years, 7 months ago (2014-05-16 11:19:49 UTC) #10
Nils Barth (inactive)
The CQ bit was unchecked by nbarth@chromium.org
6 years, 7 months ago (2014-05-16 11:34:14 UTC) #11
Nils Barth (inactive)
Updated; hope you find the new error messages rather more legible! (There may be a ...
6 years, 7 months ago (2014-05-16 11:42:01 UTC) #12
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 7 months ago (2014-05-16 11:42:06 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/284163002/100001
6 years, 7 months ago (2014-05-16 11:42:11 UTC) #14
Nils Barth (inactive)
The CQ bit was unchecked by nbarth@chromium.org
6 years, 7 months ago (2014-05-16 13:05:25 UTC) #15
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 7 months ago (2014-05-16 13:05:31 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/284163002/100001
6 years, 7 months ago (2014-05-16 13:05:43 UTC) #17
commit-bot: I haz the power
6 years, 7 months ago (2014-05-16 13:44:31 UTC) #18
Message was sent while issue was closed.
Change committed as 174168

Powered by Google App Engine
This is Rietveld 408576698