| Index: content/browser/indexed_db/indexed_db_transaction.cc
|
| diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc
|
| index 4c43f9953238e3cb1ab028edfe08ed49cad9afd0..42d14d33491671373afdfc8221e360c6c1752dc2 100644
|
| --- a/content/browser/indexed_db/indexed_db_transaction.cc
|
| +++ b/content/browser/indexed_db/indexed_db_transaction.cc
|
| @@ -364,10 +364,8 @@ leveldb::Status IndexedDBTransaction::CommitPhaseTwo() {
|
| "txn.id", id());
|
| callbacks_->OnComplete(*this);
|
| }
|
| - if (!pending_observers_.empty() && connection_) {
|
| + if (!pending_observers_.empty() && connection_)
|
| connection_->ActivatePendingObservers(std::move(pending_observers_));
|
| - pending_observers_.clear();
|
| - }
|
|
|
| database_->TransactionFinished(this, true);
|
| // RemoveTransaction will delete |this|.
|
| @@ -482,6 +480,7 @@ void IndexedDBTransaction::CloseOpenCursors() {
|
| void IndexedDBTransaction::AddPendingObserver(
|
| int32_t observer_id,
|
| const IndexedDBObserver::Options& options) {
|
| + CHECK_NE(mode(), blink::WebIDBTransactionModeVersionChange);
|
| pending_observers_.push_back(base::MakeUnique<IndexedDBObserver>(
|
| observer_id, object_store_ids_, options));
|
| }
|
| @@ -510,13 +509,12 @@ void IndexedDBTransaction::AddObservation(
|
| it->second->observations.push_back(std::move(observation));
|
| }
|
|
|
| -void IndexedDBTransaction::RecordObserverForLastObservation(
|
| - int32_t connection_id,
|
| - int32_t observer_id) {
|
| +::indexed_db::mojom::ObserverChangesPtr*
|
| +IndexedDBTransaction::GetPendingChangesForConnection(int32_t connection_id) {
|
| auto it = connection_changes_map_.find(connection_id);
|
| - DCHECK(it != connection_changes_map_.end());
|
| - it->second->observation_index_map[observer_id].push_back(
|
| - it->second->observations.size() - 1);
|
| + if (it != connection_changes_map_.end())
|
| + return &it->second;
|
| + return nullptr;
|
| }
|
|
|
| } // namespace content
|
|
|