Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: Source/WebCore/Modules/indexeddb/IDBCursor.cpp

Issue 11336016: Revert 128379 - IndexedDB: Use ScriptValue instead of SerializedScriptValue when possible (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBCursor.h ('k') | Source/WebCore/Modules/indexeddb/IDBCursor.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBCursor.h ('k') | Source/WebCore/Modules/indexeddb/IDBCursor.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698