Index: Source/WebCore/Modules/indexeddb/IDBCursor.cpp |
=================================================================== |
--- Source/WebCore/Modules/indexeddb/IDBCursor.cpp (revision 132818) |
+++ Source/WebCore/Modules/indexeddb/IDBCursor.cpp (working copy) |
@@ -125,9 +125,10 @@ |
return m_source.get(); |
} |
-PassRefPtr<IDBRequest> IDBCursor::update(ScriptExecutionContext* context, ScriptValue& value, ExceptionCode& ec) |
+PassRefPtr<IDBRequest> IDBCursor::update(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> prpValue, ExceptionCode& ec) |
{ |
IDB_TRACE("IDBCursor::update"); |
+ RefPtr<SerializedScriptValue> value = prpValue; |
if (!m_gotValue || isKeyCursor()) { |
ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; |
@@ -141,12 +142,17 @@ |
ec = IDBDatabaseException::READ_ONLY_ERR; |
return 0; |
} |
+ if (value->blobURLs().size() > 0) { |
+ // FIXME: Add Blob/File/FileList support |
+ ec = IDBDatabaseException::IDB_DATA_CLONE_ERR; |
+ return 0; |
+ } |
RefPtr<IDBObjectStore> objectStore = effectiveObjectStore(); |
const IDBKeyPath& keyPath = objectStore->metadata().keyPath; |
const bool usesInLineKeys = !keyPath.isNull(); |
if (usesInLineKeys) { |
- RefPtr<IDBKey> keyPathKey = createIDBKeyFromScriptValueAndKeyPath(value, keyPath); |
+ RefPtr<IDBKey> keyPathKey = createIDBKeyFromSerializedValueAndKeyPath(value, keyPath); |
if (!keyPathKey || !keyPathKey->isEqual(m_currentPrimaryKey.get())) { |
ec = IDBDatabaseException::DATA_ERR; |
return 0; |