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

Issue 373043004: IDL: Treat undefined as missing for optional arguments with defaults (Closed)

Created:
6 years, 5 months ago by Jens Widell
Modified:
6 years, 5 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

IDL: Treat undefined as missing for optional arguments with defaults For optional arguments with defaults, treat undefined as missing simply by checking 'info[N].IsUndefined()' instead of 'N <= info.Length()'. This works since V8's indexing operator returns an undefined value for all out-of-range indexes. Changes in behavior that had (or now has) testing coverade matches Firefox (Nightly), except in the case of WebKitCSSMatrix's constructor, which Firefox naturally doesn't have. BUG=335871 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177920

Patch Set 1 : #

Patch Set 2 : add more tests #

Patch Set 3 : update test expectations #

Patch Set 4 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -69 lines) Patch
M LayoutTests/fast/css/shorthand-setProperty-important.html View 1 1 chunk +10 lines, -0 lines 0 comments Download
M LayoutTests/fast/css/shorthand-setProperty-important-expected.txt View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/Comment/comment-constructor.html View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/Comment/comment-constructor-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-optional-title.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-optional-title-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value.html View 1 1 chunk +5 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/HTMLDialogElement/dialog-return-value-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html View 1 2 chunks +16 lines, -4 lines 0 comments Download
M LayoutTests/fast/dom/NodeIterator/NodeIterator-basic-expected.txt View 1 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/fast/dom/Text/text-constructor.html View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/Text/text-constructor-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/TreeWalker/TreeWalker-basic.html View 1 2 chunks +16 lines, -4 lines 0 comments Download
M LayoutTests/fast/dom/TreeWalker/TreeWalker-basic-expected.txt View 1 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/fast/dom/Window/alert-undefined-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/Window/custom-constructors-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/encoding/api/basics.html View 1 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/forms/resources/common-setrangetext.js View 1 1 chunk +7 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/search/search-setrangetext-expected.txt View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/setrangetext-expected.txt View 1 5 chunks +30 lines, -0 lines 0 comments Download
M LayoutTests/fast/forms/textarea/textarea-setrangetext-expected.txt View 1 2 2 chunks +12 lines, -0 lines 0 comments Download
M LayoutTests/fast/js/custom-constructors-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/js/script-tests/custom-constructors.js View 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/workers/resources/shared-worker-name.js View 6 chunks +15 lines, -32 lines 0 comments Download
M LayoutTests/fast/workers/shared-worker-name-expected.txt View 1 chunk +1 line, -3 lines 0 comments Download
M LayoutTests/media/encrypted-media/encrypted-media-istypesupported.html View 1 1 chunk +8 lines, -0 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 chunk +1 line, -1 line 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/V8TestObject.cpp View 1 2 3 10 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Jens Widell
PTAL This is an incomplete fix: it addresses the issue for one class of optional ...
6 years, 5 months ago (2014-07-08 12:10:21 UTC) #1
haraken
LGTM. Just to confirm: The new behavior aligns with both the spec and Firefox (except ...
6 years, 5 months ago (2014-07-08 13:10:48 UTC) #2
Jens Widell
On 2014/07/08 13:10:48, haraken wrote: > LGTM. > > Just to confirm: The new behavior ...
6 years, 5 months ago (2014-07-08 13:25:25 UTC) #3
Jens Widell
On 2014/07/08 13:25:25, Jens Lindström wrote: > I can investigate this more before committing. I've ...
6 years, 5 months ago (2014-07-10 11:08:26 UTC) #4
haraken
On 2014/07/10 11:08:26, Jens Lindström wrote: > On 2014/07/08 13:25:25, Jens Lindström wrote: > > ...
6 years, 5 months ago (2014-07-10 11:23:27 UTC) #5
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 5 months ago (2014-07-10 11:50:22 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/373043004/80001
6 years, 5 months ago (2014-07-10 11:50:46 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 5 months ago (2014-07-10 12:55:01 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-10 13:36:07 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/16237)
6 years, 5 months ago (2014-07-10 13:36:07 UTC) #10
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 5 months ago (2014-07-10 17:27:49 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/373043004/80001
6 years, 5 months ago (2014-07-10 17:28:20 UTC) #12
commit-bot: I haz the power
Change committed as 177857
6 years, 5 months ago (2014-07-10 17:30:08 UTC) #13
Justin Novosad
A revert of this CL has been created in https://codereview.chromium.org/382833003/ by junov@chromium.org. The reason for ...
6 years, 5 months ago (2014-07-10 18:23:13 UTC) #14
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 5 months ago (2014-07-11 05:54:55 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/373043004/100001
6 years, 5 months ago (2014-07-11 05:55:19 UTC) #16
Jens Widell
On 2014/07/11 05:54:55, Jens Lindström wrote: > The CQ bit was checked by mailto:jl@opera.com Resubmitting. ...
6 years, 5 months ago (2014-07-11 05:55:56 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 5 months ago (2014-07-11 07:05:06 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-11 08:09:42 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/15978)
6 years, 5 months ago (2014-07-11 08:09:42 UTC) #20
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 5 months ago (2014-07-11 08:17:30 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/373043004/100001
6 years, 5 months ago (2014-07-11 08:17:55 UTC) #22
commit-bot: I haz the power
6 years, 5 months ago (2014-07-11 09:30:41 UTC) #23
Message was sent while issue was closed.
Change committed as 177920

Powered by Google App Engine
This is Rietveld 408576698