DescriptionIDL: 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 #
Messages
Total messages: 10 (0 generated)
|