| Index: Source/web/IDBDatabaseBackendProxy.cpp
|
| diff --git a/Source/web/IDBDatabaseBackendProxy.cpp b/Source/web/IDBDatabaseBackendProxy.cpp
|
| index 0680198a98a3aca59392e6aebbb9d0518dfcc9f0..e65409acab417a2e09927a88f73456204c618d4d 100644
|
| --- a/Source/web/IDBDatabaseBackendProxy.cpp
|
| +++ b/Source/web/IDBDatabaseBackendProxy.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "modules/indexeddb/IDBDatabaseCallbacks.h"
|
| #include "modules/indexeddb/IDBKeyRange.h"
|
| #include "modules/indexeddb/IDBMetadata.h"
|
| +#include "public/platform/WebBlobInfo.h"
|
| #include "public/platform/WebData.h"
|
| #include "public/platform/WebIDBCursor.h"
|
| #include "public/platform/WebIDBDatabase.h"
|
| @@ -103,10 +104,20 @@ void IDBDatabaseBackendProxy::get(int64_t transactionId, int64_t objectStoreId,
|
| m_webIDBDatabase->get(transactionId, objectStoreId, indexId, keyRange, keyOnly, new WebIDBCallbacksImpl(callbacks));
|
| }
|
|
|
| -void IDBDatabaseBackendProxy::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
|
| +void IDBDatabaseBackendProxy::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, const Vector<WebCore::BlobInfo>* blobInfo, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
|
| {
|
| if (m_webIDBDatabase) {
|
| - m_webIDBDatabase->put(transactionId, objectStoreId, WebData(value), key, static_cast<WebIDBDatabase::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), indexIds, indexKeys);
|
| + size_t blobCount = blobInfo ? blobInfo->size() : 0;
|
| + WebVector<WebBlobInfo> webBlobInfo(blobCount);
|
| + for (size_t i = 0; i < blobCount; ++i) {
|
| + const WebCore::BlobInfo& info = (*blobInfo)[i];
|
| + if (info.isFile())
|
| + webBlobInfo[i] = WebBlobInfo(WebString(), info.filePath(), info.fileName(), info.type());
|
| + else
|
| + webBlobInfo[i] = WebBlobInfo(info.url(), info.type(), info.size());
|
| + }
|
| +
|
| + m_webIDBDatabase->put(transactionId, objectStoreId, WebData(value), webBlobInfo, key, static_cast<WebIDBDatabase::PutMode>(putMode), new WebIDBCallbacksImpl(callbacks), indexIds, indexKeys);
|
| }
|
| }
|
|
|
|
|