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

Issue 12159005: Dartifying some IndexedDB APIs. (Closed)

Created:
7 years, 10 months ago by blois
Modified:
7 years, 10 months ago
Reviewers:
nweiz, sra1
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Dartifying some IndexedDB APIs. BUG= Committed: https://code.google.com/p/dart/source/detail?r=18338

Patch Set 1 : #

Patch Set 2 : #

Total comments: 20

Patch Set 3 : #

Total comments: 6

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+914 lines, -533 lines) Patch
M sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart View 1 2 3 7 chunks +203 lines, -13 lines 0 comments Download
M sdk/lib/indexed_db/dartium/indexed_db_dartium.dart View 1 2 3 10 chunks +194 lines, -13 lines 0 comments Download
M tests/html/indexeddb_1_test.dart View 1 2 3 2 chunks +92 lines, -157 lines 0 comments Download
M tests/html/indexeddb_2_test.dart View 1 2 3 3 chunks +32 lines, -70 lines 0 comments Download
M tests/html/indexeddb_3_test.dart View 1 2 3 3 chunks +81 lines, -126 lines 0 comments Download
M tests/html/indexeddb_4_test.dart View 1 2 3 chunks +94 lines, -153 lines 0 comments Download
M tests/html/utils.dart View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M tools/dom/idl/dart/dart.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tools/dom/scripts/htmlrenamer.py View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M tools/dom/templates/html/impl/impl_IDBFactory.darttemplate View 1 2 3 1 chunk +61 lines, -0 lines 0 comments Download
A tools/dom/templates/html/impl/impl_IDBObjectStore.darttemplate View 1 2 1 chunk +109 lines, -0 lines 0 comments Download
A tools/dom/templates/html/impl/impl_IDBTransaction.darttemplate View 1 2 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
nweiz
https://codereview.chromium.org/12159005/diff/13001/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart File sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart (right): https://codereview.chromium.org/12159005/diff/13001/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart#newcode348 sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart:348: {int version, void onUpgradeNeeded(VersionChangeEvent)}) { It's probably worthwhile to ...
7 years, 10 months ago (2013-02-05 02:03:18 UTC) #1
blois
https://codereview.chromium.org/12159005/diff/13001/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart File sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart (right): https://codereview.chromium.org/12159005/diff/13001/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart#newcode348 sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart:348: {int version, void onUpgradeNeeded(VersionChangeEvent)}) { On 2013/02/05 02:03:19, nweiz ...
7 years, 10 months ago (2013-02-05 03:02:42 UTC) #2
nweiz
https://codereview.chromium.org/12159005/diff/13001/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart File sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart (right): https://codereview.chromium.org/12159005/diff/13001/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart#newcode410 sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart:410: Future _completeRequest(Request request, Completer completer) { On 2013/02/05 03:02:42, ...
7 years, 10 months ago (2013-02-05 03:05:39 UTC) #3
blois
Updated with additional cleanup & fixes for latest Chrome bits (see Transaction.completed future). https://codereview.chromium.org/12159005/diff/13001/tests/html/utils.dart File ...
7 years, 10 months ago (2013-02-06 23:34:13 UTC) #4
nweiz
lgtm https://codereview.chromium.org/12159005/diff/13002/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart File sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart (right): https://codereview.chromium.org/12159005/diff/13002/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart#newcode352 sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart:352: 'version specified but not onUpgradeNeeded')); This is inaccurate ...
7 years, 10 months ago (2013-02-07 20:38:10 UTC) #5
sra1
lgtm https://chromiumcodereview.appspot.com/12159005/diff/13002/tests/html/indexeddb_1_test.dart File tests/html/indexeddb_1_test.dart (right): https://chromiumcodereview.appspot.com/12159005/diff/13002/tests/html/indexeddb_1_test.dart#newcode17 tests/html/indexeddb_1_test.dart:17: return chainSteps([ This does not seem much of ...
7 years, 10 months ago (2013-02-08 02:30:28 UTC) #6
blois
7 years, 10 months ago (2013-02-08 22:18:56 UTC) #7
https://codereview.chromium.org/12159005/diff/13002/sdk/lib/indexed_db/dart2j...
File sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart (right):

https://codereview.chromium.org/12159005/diff/13002/sdk/lib/indexed_db/dart2j...
sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart:352: 'version specified but
not onUpgradeNeeded'));
On 2013/02/07 20:38:10, nweiz wrote:
> This is inaccurate if onUpgradeNeeded is specified but not version.

Done.

https://codereview.chromium.org/12159005/diff/13002/tests/html/indexeddb_1_te...
File tests/html/indexeddb_1_test.dart (right):

https://codereview.chromium.org/12159005/diff/13002/tests/html/indexeddb_1_te...
tests/html/indexeddb_1_test.dart:17: return chainSteps([
On 2013/02/08 02:30:28, sra1 wrote:
> This does not seem much of a win over an explicit .then chain
> 
> html.window.indexedDB.deleteDatabase(dbName)
>   .then(
>     (_) {
>       return html.window.indexedDB.open(dbName, version: 1,
>           onUpgradeNeeded: (e) {});
>     })
>   .then(
>     (db) {
>       db.close();
>     })
>   .then(
>     (_) {
>       return html.window.indexedDB.open(dbName, version: 2,
>           onUpgradeNeeded: (e) {
>             // Bug 8265, we're getting the wrong type here.
>             //expect(e.oldVersion, 1);
>             //expect(e.newVersion, 2);
>             upgraded = true;
>           });
>       })
>   .then(
>     (_db) {
>       expect(upgraded, isTrue);
>     });

True- when I had the guardAsync around the methods in chain it eliminated a good
amount of overhead, but no more. Gone.

https://codereview.chromium.org/12159005/diff/13002/tests/html/indexeddb_3_te...
File tests/html/indexeddb_3_test.dart (right):

https://codereview.chromium.org/12159005/diff/13002/tests/html/indexeddb_3_te...
tests/html/indexeddb_3_test.dart:75: var cursors =
objectStore.openCursor(direction:'prev').asBroadcastStream();
On 2013/02/07 20:38:10, nweiz wrote:
> Style nit: space after ":"

Done.

Powered by Google App Engine
This is Rietveld 408576698