Index: components/prefs/json_pref_store.cc |
diff --git a/components/prefs/json_pref_store.cc b/components/prefs/json_pref_store.cc |
index e91a4063f7bf4307486017741afe8b666a27c25d..fe19f9573444ce9a8f6ee0a4f2b71b9faad8b1d7 100644 |
--- a/components/prefs/json_pref_store.cc |
+++ b/components/prefs/json_pref_store.cc |
@@ -382,10 +382,11 @@ void JsonPrefStore::RegisterOnNextSuccessfulWriteReply( |
void JsonPrefStore::RegisterOnNextWriteSynchronousCallbacks( |
OnWriteCallbackPair callbacks) { |
DCHECK(CalledOnValidThread()); |
- DCHECK(!has_pending_write_callbacks_); |
has_pending_write_callbacks_ = true; |
+ // Note that this shouldn't clobber callbacks previously added by this method, |
+ // as |writer_|'s WriteNow() will be called in sequence. |
gab
2016/10/04 19:05:32
I don't think this comment is required, it's never
proberge
2016/10/04 20:17:58
Done.
|
writer_.RegisterOnNextWriteCallbacks( |
callbacks.first, |
base::Bind( |