Chromium Code Reviews| Index: Source/modules/indexeddb/IDBObjectStore.cpp |
| diff --git a/Source/modules/indexeddb/IDBObjectStore.cpp b/Source/modules/indexeddb/IDBObjectStore.cpp |
| index 0ff9486ac70dc8db55c1d7cecb96e0bb921d4a95..55cd93cf0583a2412feb7ce96b825aa53e98ad60 100644 |
| --- a/Source/modules/indexeddb/IDBObjectStore.cpp |
| +++ b/Source/modules/indexeddb/IDBObjectStore.cpp |
| @@ -40,13 +40,17 @@ |
| #include "modules/indexeddb/IDBTracing.h" |
| #include "modules/indexeddb/WebIDBCallbacksImpl.h" |
| #include "platform/SharedBuffer.h" |
| +#include "public/platform/WebBlobInfo.h" |
| #include "public/platform/WebData.h" |
| #include "public/platform/WebIDBKey.h" |
| #include "public/platform/WebIDBKeyRange.h" |
| +#include "public/platform/WebVector.h" |
| +using blink::WebBlobInfo; |
| using blink::WebIDBCallbacks; |
| using blink::WebIDBCursor; |
| using blink::WebIDBDatabase; |
| +using blink::WebVector; |
| namespace WebCore { |
| @@ -169,7 +173,9 @@ PassRefPtrWillBeRawPtr<IDBRequest> IDBObjectStore::put(ExecutionContext* executi |
| return nullptr; |
| } |
| - RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::create(value, 0, exceptionState, toIsolate(executionContext)); |
| + Vector<WebBlobInfo> blobInfo; |
| + |
| + RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::create(value, &blobInfo, exceptionState, toIsolate(executionContext)); |
| if (exceptionState.hadException()) |
| return nullptr; |
| @@ -178,6 +184,7 @@ PassRefPtrWillBeRawPtr<IDBRequest> IDBObjectStore::put(ExecutionContext* executi |
| exceptionState.throwDOMException(DataCloneError, "The object store currently does not support blob values."); |
| return nullptr; |
| } |
| + ASSERT(blobInfo.isEmpty()); |
| const IDBKeyPath& keyPath = m_metadata.keyPath; |
| const bool usesInLineKeys = !keyPath.isNull(); |
| @@ -233,7 +240,9 @@ PassRefPtrWillBeRawPtr<IDBRequest> IDBObjectStore::put(ExecutionContext* executi |
| Vector<char> wireBytes; |
| serializedValue->toWireBytes(wireBytes); |
| RefPtr<SharedBuffer> valueBuffer = SharedBuffer::adoptVector(wireBytes); |
| - backendDB()->put(m_transaction->id(), id(), blink::WebData(valueBuffer), key.release(), static_cast<WebIDBDatabase::PutMode>(putMode), WebIDBCallbacksImpl::create(request).leakPtr(), indexIds, indexKeys); |
| + WebVector<WebBlobInfo> webBlobInfo = blobInfo; |
|
jsbell
2014/04/30 23:43:17
Do you even need this line, or will the compiler d
|
| + |
| + backendDB()->put(m_transaction->id(), id(), blink::WebData(valueBuffer), webBlobInfo, key.release(), static_cast<WebIDBDatabase::PutMode>(putMode), WebIDBCallbacksImpl::create(request).leakPtr(), indexIds, indexKeys); |
| return request.release(); |
| } |