|
|
IndexedDB: Use [Default] in IDLs to reduce overloads in implementations
By default, if the IDL for interface XXX has foo(optional int x) then
the implementation must have XXX::foo() and XXX::foo(int x). Adding
[Default=Undefined] lets the implementation drop the overload and (the
coerced value of) |undefined| will be passed in. Use this in IndexedDB
IDLs to reduce the overload clutter in implementations.
This does allow add() and put() to be called with |undefined| as a
literal second element which is ignored, but there is gathering
consensus in the webapps group that this is desirable to match ES6
semantics. The linked bug tracks making all optional arguments accept
|undefined|.
BUG= 163959
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=148581
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+300 lines, -63 lines) |
Patch |
 |
A |
LayoutTests/storage/indexeddb/optional-arguments.html
|
View
|
1
|
1 chunk |
+132 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/storage/indexeddb/optional-arguments-expected.txt
|
View
|
1
|
1 chunk |
+137 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/inspector/InspectorIndexedDBAgent.cpp
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBCursor.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBCursor.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBCursor.idl
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBIndex.h
|
View
|
|
1 chunk |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBIndex.idl
|
View
|
|
1 chunk |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBKeyRange.h
|
View
|
|
2 chunks |
+3 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBKeyRange.idl
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBObjectStore.h
|
View
|
|
3 chunks |
+7 lines, -12 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBObjectStore.cpp
|
View
|
|
1 chunk |
+1 line, -13 lines |
0 comments
|
Download
|
 |
M |
Source/modules/indexeddb/IDBObjectStore.idl
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
Total messages: 9 (0 generated)
|