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

Issue 1476863003: bindings: Ignores the last undefined arguments when counting the args. (Closed)

Created:
5 years ago by Yuki
Modified:
5 years ago
Reviewers:
haraken, jsbell, bashi
CC:
chromium-reviews, blink-reviews, blink-reviews-bindings_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bindings: Ignores the last undefined arguments when counting the args. foo(arg1, arg2, undefined) should be interpreted as foo(arg1, arg2). This CL checks if the last arguments are undefined or not, and counts the number of actual arguments. With this change, overloaded C++ functions, such as foo(int, int, T*) and foo(int, int), will be resolved correctly. Note that DOMTokenList::toggle("name") and DOMTokenList::toggle("name", false) behave *differently*. (Oh, my...) So, it's important to count the actual number of arguments correctly. BUG=489665 Committed: https://crrev.com/a9a901bc9a158c5e60cda9bbb96fa50ce0c76489 Cr-Commit-Position: refs/heads/master@{#362635}

Patch Set 1 #

Patch Set 2 : Updated layout tests. #

Total comments: 4

Patch Set 3 : Addressed review comments. #

Patch Set 4 : Synced. #

Total comments: 3

Patch Set 5 : Synced. #

Patch Set 6 : Addressed a review comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -57 lines) Patch
M third_party/WebKit/LayoutTests/fast/canvas/canvas-isPointInPath-winding-expected.txt View 1 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-clip-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/canvas-path-context-fill-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/canvas-scroll-path-into-view-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js View 1 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-clip.js View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-path-context-fill.js View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/script-tests/canvas-scroll-path-into-view.js View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/counters/counter-reset-subtree-insert-crash.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/clipboard-clearData.html View 1 2 chunks +11 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/clipboard-clearData-expected.txt View 1 2 chunks +5 lines, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt View 1 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt View 1 2 3 4 5 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-path-context-clip-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-path-context-fill-expected.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_interface.py View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_methods.py View 1 2 3 4 chunks +17 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp View 1 2 3 2 chunks +13 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 2 chunks +14 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp View 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 2 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 2 chunks +14 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 16 chunks +113 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 18 (5 generated)
Yuki
Could you review this CL?
5 years ago (2015-11-26 10:06:26 UTC) #2
bashi
The change itself looks good. Could you confirm that the behavior change aligns with Firefox? ...
5 years ago (2015-11-26 23:37:18 UTC) #3
Yuki
For the issue 489665, this CL behaves the same as Firefox. I also confirmed that ...
5 years ago (2015-11-30 06:53:23 UTC) #4
bashi
Thank you for the clarification! LGTM.
5 years ago (2015-11-30 23:13:26 UTC) #5
haraken
LGTM
5 years ago (2015-11-30 23:36:57 UTC) #6
jsbell
Awesome! Quick notes about the indexeddb tests... https://codereview.chromium.org/1476863003/diff/60001/third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt File third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt (right): https://codereview.chromium.org/1476863003/diff/60001/third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt#newcode12 third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt:12: FAIL Calling ...
5 years ago (2015-12-01 00:31:02 UTC) #8
jsbell
On 2015/12/01 00:31:02, jsbell wrote: > That means the test is wrong. Can you file ...
5 years ago (2015-12-01 00:35:26 UTC) #9
Yuki
On 2015/12/01 00:35:26, jsbell wrote: > On 2015/12/01 00:31:02, jsbell wrote: > > That means ...
5 years ago (2015-12-01 05:20:44 UTC) #10
Yuki
https://codereview.chromium.org/1476863003/diff/60001/third_party/WebKit/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js File third_party/WebKit/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js (right): https://codereview.chromium.org/1476863003/diff/60001/third_party/WebKit/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js#newcode28 third_party/WebKit/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js:28: evalAndLog("indexedDB.open(dbname, undefined)"); On 2015/12/01 00:31:02, jsbell wrote: > Can ...
5 years ago (2015-12-01 05:57:44 UTC) #11
jsbell
lgtm!
5 years ago (2015-12-01 17:21:14 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1476863003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1476863003/100001
5 years ago (2015-12-02 04:58:30 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years ago (2015-12-02 05:04:51 UTC) #16
commit-bot: I haz the power
5 years ago (2015-12-02 05:05:33 UTC) #18
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/a9a901bc9a158c5e60cda9bbb96fa50ce0c76489
Cr-Commit-Position: refs/heads/master@{#362635}

Powered by Google App Engine
This is Rietveld 408576698