| Index: chrome/browser/sync/syncable/syncable.cc
|
| diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc
|
| index 7c6cc712802545e9a09686a0d16fc7bb8472ed6f..5516c594a52d9afedee00b69785acf0e761e77bf 100644
|
| --- a/chrome/browser/sync/syncable/syncable.cc
|
| +++ b/chrome/browser/sync/syncable/syncable.cc
|
| @@ -950,6 +950,8 @@ BaseTransaction::BaseTransaction(Directory* directory, const char* name,
|
| Lock();
|
| }
|
|
|
| +BaseTransaction::~BaseTransaction() {}
|
| +
|
| void BaseTransaction::UnlockAndLog(OriginalEntries* originals_arg) {
|
| dirkernel_->transaction_mutex.AssertAcquired();
|
|
|
| @@ -972,8 +974,17 @@ void BaseTransaction::UnlockAndLog(OriginalEntries* originals_arg) {
|
| originals.get(), this, writer_ };
|
| dirkernel_->changes_channel.Notify(event);
|
|
|
| + // Necessary for reads to be performed prior to transaction mutex release.
|
| + // Allows the listener to use the current transaction to perform reads.
|
| + DirectoryChangeEvent ending_event =
|
| + { DirectoryChangeEvent::TRANSACTION_ENDING,
|
| + NULL, this, INVALID };
|
| + dirkernel_->changes_channel.Notify(ending_event);
|
| +
|
| dirkernel_->transaction_mutex.Release();
|
|
|
| + // Directly after transaction mutex release, but lock on changes channel.
|
| + // You cannot be re-entrant to a transaction in this handler.
|
| DirectoryChangeEvent complete_event =
|
| { DirectoryChangeEvent::TRANSACTION_COMPLETE,
|
| NULL, NULL, INVALID };
|
|
|