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

Unified Diff: tools/dom/templates/html/impl/impl_IDBFactory.darttemplate

Issue 1914583002: Use _downcast and _cast instead of "as" to reduce dart2js output size. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate b/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
index a14677894b5fcf127e7f2ce63616d897e103a138..b82020f615b239adf4864be3e0b37913a1d6d4a3 100644
--- a/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
@@ -105,7 +105,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;

Powered by Google App Engine
This is Rietveld 408576698