| OLD | NEW |
| 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:nativewrappers'; | 6 import 'dart:nativewrappers'; |
| 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 7 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 8 // for details. All rights reserved. Use of this source code is governed by a | 8 // for details. All rights reserved. Use of this source code is governed by a |
| 9 // BSD-style license that can be found in the LICENSE file. | 9 // BSD-style license that can be found in the LICENSE file. |
| 10 | 10 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 Request $dom_webkitGetDatabaseNames() native "IDBFactory_webkitGetDatabaseName
s_Callback"; | 329 Request $dom_webkitGetDatabaseNames() native "IDBFactory_webkitGetDatabaseName
s_Callback"; |
| 330 | 330 |
| 331 } | 331 } |
| 332 | 332 |
| 333 | 333 |
| 334 /** | 334 /** |
| 335 * Ties a request to a completer, so the completer is completed when it succeeds | 335 * Ties a request to a completer, so the completer is completed when it succeeds |
| 336 * and errors out when the request errors. | 336 * and errors out when the request errors. |
| 337 */ | 337 */ |
| 338 Future _completeRequest(Request request) { | 338 Future _completeRequest(Request request) { |
| 339 var completer = new Completer(); | 339 var completer = new Completer.sync(); |
| 340 // TODO: make sure that completer.complete is synchronous as transactions | 340 // TODO: make sure that completer.complete is synchronous as transactions |
| 341 // may be committed if the result is not processed immediately. | 341 // may be committed if the result is not processed immediately. |
| 342 request.onSuccess.listen((e) { | 342 request.onSuccess.listen((e) { |
| 343 completer.complete(request.result); | 343 completer.complete(request.result); |
| 344 }); | 344 }); |
| 345 request.onError.listen((e) { | 345 request.onError.listen((e) { |
| 346 completer.completeError(e); | 346 completer.completeError(e); |
| 347 }); | 347 }); |
| 348 return completer.future; | 348 return completer.future; |
| 349 } | 349 } |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 | 1102 |
| 1103 // WARNING: Do not edit - generated code. | 1103 // WARNING: Do not edit - generated code. |
| 1104 | 1104 |
| 1105 | 1105 |
| 1106 @DocsEditable | 1106 @DocsEditable |
| 1107 @DomName('IDBAny') | 1107 @DomName('IDBAny') |
| 1108 abstract class _IDBAny extends NativeFieldWrapperClass1 { | 1108 abstract class _IDBAny extends NativeFieldWrapperClass1 { |
| 1109 _IDBAny.internal(); | 1109 _IDBAny.internal(); |
| 1110 | 1110 |
| 1111 } | 1111 } |
| OLD | NEW |