| Index: third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
|
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
|
| index abb4042ff9422d42bb4a623c04727b979e96e9ad..5d4c9e3d814095f126c365745ae5d4dc8d7ebf4d 100644
|
| --- a/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
|
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
|
| @@ -9,6 +9,9 @@
|
| #include "bindings/modules/v8/ToV8ForModules.h"
|
| #include "bindings/modules/v8/V8BindingForModules.h"
|
| #include "modules/indexeddb/IDBAny.h"
|
| +#include "modules/indexeddb/IDBObservation.h"
|
| +#include "public/platform/modules/indexeddb/WebIDBObservation.h"
|
| +#include "public/platform/modules/indexeddb/WebIDBTypes.h"
|
|
|
| namespace blink {
|
|
|
| @@ -17,16 +20,22 @@ ScriptValue IDBObserverChanges::records(ScriptState* scriptState)
|
| return ScriptValue::from(scriptState, m_records);
|
| }
|
|
|
| -IDBObserverChanges* IDBObserverChanges::create(IDBDatabase* database, IDBTransaction* transaction, IDBAny* records)
|
| +IDBObserverChanges* IDBObserverChanges::create(const std::vector<WebIDBObservation>& observations, const std::vector<int32_t>& observationIndex)
|
| {
|
| - return new IDBObserverChanges(database, transaction, records);
|
| + return new IDBObserverChanges(observations, observationIndex);
|
| }
|
|
|
| -IDBObserverChanges::IDBObserverChanges(IDBDatabase* database, IDBTransaction* transaction, IDBAny* records)
|
| - : m_database(database)
|
| - , m_transaction(transaction)
|
| - , m_records(records)
|
| +IDBObserverChanges::IDBObserverChanges(const std::vector<WebIDBObservation>& observations, const std::vector<int32_t>& observationIndex)
|
| {
|
| + createMap(observations, observationIndex);
|
| +}
|
| +
|
| +void IDBObserverChanges::createMap(const std::vector<WebIDBObservation>& observations, const std::vector<int32_t>& observationIndex)
|
| +{
|
| +
|
| + for (const auto& idx : observationIndex) {
|
| + m_records.append(IDBObservation::create(observations[idx]));
|
| + }
|
| }
|
|
|
| DEFINE_TRACE(IDBObserverChanges)
|
|
|