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

Unified Diff: components/signin/core/browser/account_reconcilor.cc

Issue 339223004: Fix account_reconcilor crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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: components/signin/core/browser/account_reconcilor.cc
diff --git a/components/signin/core/browser/account_reconcilor.cc b/components/signin/core/browser/account_reconcilor.cc
index 1fd4cff900313875753caa65836b50b26793f3f9..c5077bb1f12136e3d854f64fcb99c0d2308bd395 100644
--- a/components/signin/core/browser/account_reconcilor.cc
+++ b/components/signin/core/browser/account_reconcilor.cc
@@ -661,10 +661,12 @@ void AccountReconcilor::FinishReconcile() {
}
// For each account in the gaia cookie not known to chrome,
- // PerformAddToChromeAction.
+ // PerformAddToChromeAction. Make a copy of |add_to_chrome| since calls to
+ // PerformAddToChromeAction() may modify this array.
+ std::vector<std::pair<std::string, int> > add_to_chrome_copy = add_to_chrome_;
for (std::vector<std::pair<std::string, int> >::const_iterator i =
- add_to_chrome_.begin();
- i != add_to_chrome_.end();
+ add_to_chrome_copy.begin();
+ i != add_to_chrome_copy.end();
++i) {
PerformAddToChromeAction(i->first, i->second);
}
« 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