Index: sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart |
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart |
index a69b9bcb6c8932d93ab7dedf85fba90bedac178e..65ebfc67ea3b1a0ac0edd31b439c9e444b1b780a 100644 |
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart |
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart |
@@ -635,7 +635,8 @@ Future/*<T>*/ _completeRequest/*<T>*/(Request request) { |
// TODO: make sure that completer.complete is synchronous as transactions |
// may be committed if the result is not processed immediately. |
request.onSuccess.listen((e) { |
- completer.complete(request.result as dynamic/*=T*/); |
+ var result = _cast/*<T>*/(request.result); |
+ completer.complete(result); |
}); |
request.onError.listen(completer.completeError); |
return completer.future; |
@@ -1186,7 +1187,7 @@ class ObjectStore extends Interceptor { |
request.onError.listen(controller.addError); |
request.onSuccess.listen((e) { |
- var cursor = request.result as dynamic /*=T*/; |
+ var cursor = _cast/*<T>*/(request.result); |
if (cursor == null) { |
controller.close(); |
} else { |
@@ -1199,6 +1200,9 @@ class ObjectStore extends Interceptor { |
return controller.stream; |
} |
} |
+ |
+// ignore: STRONG_MODE_DOWN_CAST_COMPOSITE |
+/*=To*/ _cast/*<To>*/(dynamic x) => x; |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |