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

Side by Side Diff: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart

Issue 14992002: More fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library dart.dom.indexed_db; 1 library dart.dom.indexed_db;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 import 'dart:html'; 4 import 'dart:html';
5 import 'dart:html_common'; 5 import 'dart:html_common';
6 import 'dart:typed_data'; 6 import 'dart:typed_data';
7 import 'dart:_js_helper' show Creates, Returns, JSName, Null; 7 import 'dart:_js_helper' show Creates, Returns, JSName, Null;
8 import 'dart:_foreign_helper' show JS; 8 import 'dart:_foreign_helper' show JS;
9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 9 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
10 // for details. All rights reserved. Use of this source code is governed by a 10 // for details. All rights reserved. Use of this source code is governed by a
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 Request $dom_webkitGetDatabaseNames() native; 457 Request $dom_webkitGetDatabaseNames() native;
458 458
459 } 459 }
460 460
461 461
462 /** 462 /**
463 * Ties a request to a completer, so the completer is completed when it succeeds 463 * Ties a request to a completer, so the completer is completed when it succeeds
464 * and errors out when the request errors. 464 * and errors out when the request errors.
465 */ 465 */
466 Future _completeRequest(Request request) { 466 Future _completeRequest(Request request) {
467 var completer = new Completer(); 467 var completer = new Completer.sync();
468 // TODO: make sure that completer.complete is synchronous as transactions 468 // TODO: make sure that completer.complete is synchronous as transactions
469 // may be committed if the result is not processed immediately. 469 // may be committed if the result is not processed immediately.
470 request.onSuccess.listen((e) { 470 request.onSuccess.listen((e) {
471 completer.complete(request.result); 471 completer.complete(request.result);
472 }); 472 });
473 request.onError.listen((e) { 473 request.onError.listen((e) {
474 completer.completeError(e); 474 completer.completeError(e);
475 }); 475 });
476 return completer.future; 476 return completer.future;
477 } 477 }
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 } 1239 }
1240 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1240 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
1241 // for details. All rights reserved. Use of this source code is governed by a 1241 // for details. All rights reserved. Use of this source code is governed by a
1242 // BSD-style license that can be found in the LICENSE file. 1242 // BSD-style license that can be found in the LICENSE file.
1243 1243
1244 1244
1245 @DocsEditable 1245 @DocsEditable
1246 @DomName('IDBAny') 1246 @DomName('IDBAny')
1247 abstract class _IDBAny native "IDBAny" { 1247 abstract class _IDBAny native "IDBAny" {
1248 } 1248 }
OLDNEW
« no previous file with comments | « samples/swarm/swarm_ui_lib/view/view.dart ('k') | sdk/lib/indexed_db/dartium/indexed_db_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698