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

Issue 152413005: IDL: allow optional values to be undefined in overload resolution (Closed)

Created:
6 years, 10 months ago by Nils Barth (inactive)
Modified:
6 years, 10 months ago
Reviewers:
haraken, jsbell+bindings
CC:
blink-reviews, kojih, arv+blink, jsbell, sof, alecflett, abarth-chromium, marja+watch_chromium.org, dgrogan, adamk+blink_chromium.org, cmumford, haraken, Nate Chapin, watchdog-blink-watchlist_google.com, Inactive
Visibility:
Public.

Description

IDL: allow optional values to be undefined in overload resolution Recent changes to overload resolution resulted in   IDBObjectStore.createIndex failing (throwing an exception) if the last (optional) argument, 'options', was undefined; concretely:   objectStore.createIndex('i', 'p', undefined) Per Web IDL spec, this should work: the last argument is optional, and should be treated as missing. This worked in M33, but failed in M34, though there was no test case, hence not caught earlier. This is a conservative fix, patching it so that this case works: overloads with an optional non-wrapper type (primarily Dictionary) generate an overload resolution check that allows undefined. This is presumably a rare case; I haven't changed behavior for optional arguments otherwise. The full issue is: Issue 335871: Treat undefined as missing optional arguments ...which is pending Python rewrite and resolution rewrite. Caused by this CL (r165620): Add overload support for non-wrapper type vs. primitive type https://codereview.chromium.org/131973012 ...because it made us stricter about undefined (not allowing undefined on resolution). BUG=340458 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166373

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -4 lines) Patch
M LayoutTests/storage/indexeddb/index-basics-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/index-basics-workers-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/index-basics.js View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/code_generator_v8.pm View 3 chunks +22 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 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

Messages

Total messages: 10 (0 generated)
Nils Barth (inactive)
haraken, could you PTAL at bindings changes? Joshua, could you PTAL at test cases? Thanks!
6 years, 10 months ago (2014-02-04 01:54:51 UTC) #1
haraken
Probably looks OK, so LGTM. It's a shame that we have to add a lot ...
6 years, 10 months ago (2014-02-04 02:19:51 UTC) #2
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 10 months ago (2014-02-04 02:53:12 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/152413005/1
6 years, 10 months ago (2014-02-04 02:53:25 UTC) #4
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-04 06:32:42 UTC) #5
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=25390
6 years, 10 months ago (2014-02-04 06:32:42 UTC) #6
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 10 months ago (2014-02-04 07:34:01 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/152413005/1
6 years, 10 months ago (2014-02-04 07:34:17 UTC) #8
commit-bot: I haz the power
Change committed as 166373
6 years, 10 months ago (2014-02-04 09:11:38 UTC) #9
Nils Barth (inactive)
6 years, 10 months ago (2014-02-04 11:24:25 UTC) #10
Message was sent while issue was closed.
Python side at:
IDL (Python): allow optional values to be undefined in overload resolution
https://codereview.chromium.org/153743002/

(Separate CLs b/c Perl one urgent.)

Powered by Google App Engine
This is Rietveld 408576698