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

Issue 14297012: IndexedDB: Use [Default] in IDLs to reduce overloads in implementations (Closed)

Created:
7 years, 8 months ago by jsbell
Modified:
7 years, 8 months ago
Reviewers:
haraken, alecflett, dgrogan
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, alecflett, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, aandrey+blink_chromium.org
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : Added more test cases #

Patch Set 3 : Rebased #

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

Messages

Total messages: 9 (0 generated)
jsbell
dgrogan@, alecflett@ - what do you think?
7 years, 8 months ago (2013-04-16 21:38:04 UTC) #1
dgrogan
On 2013/04/16 21:38:04, jsbell wrote: > dgrogan@, alecflett@ - what do you think? What are ...
7 years, 8 months ago (2013-04-16 22:47:02 UTC) #2
dgrogan
Also, a cursory search left me unable to find threads about the undefined / ES6 ...
7 years, 8 months ago (2013-04-16 22:47:53 UTC) #3
jsbell
On 2013/04/16 22:47:53, dgrogan wrote: > Also, a cursory search left me unable to find ...
7 years, 8 months ago (2013-04-16 23:00:16 UTC) #4
dgrogan
lgtm
7 years, 8 months ago (2013-04-16 23:40:22 UTC) #5
alecflett
lgtm yay!
7 years, 8 months ago (2013-04-17 00:01:49 UTC) #6
jsbell
haraken@ - could you take a look?
7 years, 8 months ago (2013-04-17 00:11:53 UTC) #7
haraken
LGTM
7 years, 8 months ago (2013-04-17 00:35:58 UTC) #8
jsbell
7 years, 8 months ago (2013-04-17 21:35:28 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 manually as r148581 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698