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

Unified Diff: utils/pub/oauth2.dart

Issue 11778108: Stop working around issue 7790 in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « utils/pub/io.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/oauth2.dart
diff --git a/utils/pub/oauth2.dart b/utils/pub/oauth2.dart
index 5ce0cefa60e7acb088d20e7dcf7bafd2a4453715..44ac07f59de34fd298003be23ae3f08b32c33613 100644
--- a/utils/pub/oauth2.dart
+++ b/utils/pub/oauth2.dart
@@ -69,7 +69,7 @@ Future clearCredentials(SystemCache cache) {
Future withClient(SystemCache cache, Future fn(Client client)) {
return _getClient(cache).then((client) {
var completer = new Completer();
- return asyncWhenComplete(fn(client), () {
+ return fn(client).whenComplete(() {
client.close();
// Be sure to save the credentials even when an error happens.
return _saveCredentials(cache, client.credentials);
« no previous file with comments | « utils/pub/io.dart ('k') | utils/pub/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698