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

Unified Diff: examples/dart/wget/main.dart

Issue 996923003: Dart: Better handle leak checks. close() is async. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 5 years, 9 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
« no previous file with comments | « examples/dart/hello_world/world/main.dart ('k') | mojo/dart/apptest/apptest/apptest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/dart/wget/main.dart
diff --git a/examples/dart/wget/main.dart b/examples/dart/wget/main.dart
index c43211fcf76cf7aab2f0bcf627fb81e6de65c523..a29c2c012be84c62b773d0f7cd34b925603d1199 100644
--- a/examples/dart/wget/main.dart
+++ b/examples/dart/wget/main.dart
@@ -35,15 +35,16 @@ class WGet extends Application {
print(">>> EOF <<<");
_closeProxies();
- close();
+ await close();
+ assert(MojoHandle.reportLeakedHandles());
}
Future<ByteData> _getUrl(String url) async {
_initProxiesIfNeeded();
var urlRequest = new UrlRequest()
- ..url = url
- ..autoFollowRedirects = true;
+ ..url = url
+ ..autoFollowRedirects = true;
var urlResponse = await _urlLoader.ptr.start(urlRequest);
print(">>> Headers <<<");
« no previous file with comments | « examples/dart/hello_world/world/main.dart ('k') | mojo/dart/apptest/apptest/apptest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698