diff options
author | Kristian Monsen <kristianm@google.com> | 2010-09-30 15:42:16 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-10-07 10:59:29 +0100 |
commit | bec39347bb3bb5bf1187ccaf471d26247f28b585 (patch) | |
tree | 56bdc4c2978fbfd3d79d0d36d5d6c640ecc09cc8 /WebCore/storage/IDBObjectStore.cpp | |
parent | 90b7966e7815b262cd19ac25f03aaad9b21fdc06 (diff) | |
download | external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.zip external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.gz external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.bz2 |
Merge WebKit at r68651 : Initial merge by git.
Change-Id: I3d6bff59f17eedd6722723354f386fec9be8ad12
Diffstat (limited to 'WebCore/storage/IDBObjectStore.cpp')
-rw-r--r-- | WebCore/storage/IDBObjectStore.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/WebCore/storage/IDBObjectStore.cpp b/WebCore/storage/IDBObjectStore.cpp index b457cd1..4c5cf34 100644 --- a/WebCore/storage/IDBObjectStore.cpp +++ b/WebCore/storage/IDBObjectStore.cpp @@ -31,6 +31,7 @@ #include "IDBIndex.h" #include "IDBKey.h" #include "IDBKeyRange.h" +#include "IDBTransactionBackendInterface.h" #include "SerializedScriptValue.h" #include <wtf/UnusedParam.h> @@ -38,8 +39,9 @@ namespace WebCore { -IDBObjectStore::IDBObjectStore(PassRefPtr<IDBObjectStoreBackendInterface> idbObjectStore) +IDBObjectStore::IDBObjectStore(PassRefPtr<IDBObjectStoreBackendInterface> idbObjectStore, IDBTransactionBackendInterface* transaction) : m_objectStore(idbObjectStore) + , m_transaction(transaction) { // We pass a reference to this object before it can be adopted. relaxAdoptionRequirement(); @@ -62,9 +64,9 @@ PassRefPtr<DOMStringList> IDBObjectStore::indexNames() const PassRefPtr<IDBRequest> IDBObjectStore::get(ScriptExecutionContext* context, PassRefPtr<IDBKey> key) { - RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this)); - m_objectStore->get(key, request); - return request; + RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get()); + m_objectStore->get(key, request, m_transaction.get()); + return request.release(); } PassRefPtr<IDBRequest> IDBObjectStore::add(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key) @@ -97,8 +99,10 @@ PassRefPtr<IDBRequest> IDBObjectStore::createIndex(ScriptExecutionContext* conte PassRefPtr<IDBIndex> IDBObjectStore::index(const String& name) { + // FIXME: If this is null, we should raise a NOT_FOUND_ERR. RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(name); - ASSERT(index); // FIXME: If this is null, we should raise a NOT_FOUND_ERR. + if (!index) + return 0; return IDBIndex::create(index.release()); } |