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

Unified Diff: chrome/browser/extensions/api/identity/identity_api.cc

Issue 829853006: IdentityLaunchWebAuthFlowFunction shouldn't be able to send response twice. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixup Created 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/identity/identity_api.cc
diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc
index c513036534cf23165900eacc94798a45d6beac61..4b9562ba1cc37038b5596fb77e923c03b3ac1756 100644
--- a/chrome/browser/extensions/api/identity/identity_api.cc
+++ b/chrome/browser/extensions/api/identity/identity_api.cc
@@ -943,6 +943,8 @@ void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure(
break;
}
SendResponse(false);
+ if (auth_flow_)
+ auth_flow_.release()->DetachDelegateAndDelete();
Release(); // Balanced in RunAsync.
}
@@ -951,6 +953,8 @@ void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange(
if (redirect_url.GetWithEmptyPath() == final_url_prefix_) {
SetResult(new base::StringValue(redirect_url.spec()));
SendResponse(true);
+ if (auth_flow_)
+ auth_flow_.release()->DetachDelegateAndDelete();
Release(); // Balanced in RunAsync.
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698