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

Side by Side Diff: sdk/lib/indexed_db/dartium/indexed_db_dartium.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: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
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | tools/dom/templates/html/impl/impl_IDBFactory.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698