| Index: chrome/browser/sync/syncable/syncable.cc
|
| ===================================================================
|
| --- chrome/browser/sync/syncable/syncable.cc (revision 53274)
|
| +++ chrome/browser/sync/syncable/syncable.cc (working copy)
|
| @@ -960,6 +960,8 @@
|
| Lock();
|
| }
|
|
|
| +BaseTransaction::~BaseTransaction() {}
|
| +
|
| void BaseTransaction::UnlockAndLog(OriginalEntries* originals_arg) {
|
| dirkernel_->transaction_mutex.AssertAcquired();
|
|
|
| @@ -982,8 +984,17 @@
|
| 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 };
|
|
|