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

Side by Side Diff: Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp

Issue 11348011: Revert 128789 - IndexedDB: Use ScriptValue instead of SerializedScriptValue for get/openCursor (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 Vector<String, 1> indexNames; 334 Vector<String, 1> indexNames;
335 indexNames.append(m_indexMetadata.name); 335 indexNames.append(m_indexMetadata.name);
336 if (cursor) { 336 if (cursor) {
337 cursor->continueFunction(ec); 337 cursor->continueFunction(ec);
338 ASSERT(!ec); 338 ASSERT(!ec);
339 339
340 RefPtr<IDBKey> primaryKey = cursor->primaryKey(); 340 RefPtr<IDBKey> primaryKey = cursor->primaryKey();
341 RefPtr<IDBAny> valueAny = cursor->value(); 341 RefPtr<IDBAny> valueAny = cursor->value();
342 342
343 ASSERT(valueAny->type() == IDBAny::ScriptValueType); 343 ASSERT(valueAny->type() == IDBAny::SerializedScriptValueType);
344 ScriptValue value = valueAny->scriptValue(); 344 RefPtr<SerializedScriptValue> serializedValue = valueAny->serialized ScriptValue();
345 ScriptValue value(deserializeIDBValue(context, serializedValue));
345 346
346 IDBObjectStore::IndexKeys indexKeys; 347 IDBObjectStore::IndexKeys indexKeys;
347 generateIndexKeysForValue(m_indexMetadata, value, &indexKeys); 348 generateIndexKeysForValue(m_indexMetadata, value, &indexKeys);
348 349
349 Vector<IDBObjectStore::IndexKeys, 1> indexKeysList; 350 Vector<IDBObjectStore::IndexKeys, 1> indexKeysList;
350 indexKeysList.append(indexKeys); 351 indexKeysList.append(indexKeys);
351 352
352 m_objectStoreBackend->setIndexKeys(primaryKey, indexNames, indexKeys List, m_transaction.get()); 353 m_objectStoreBackend->setIndexKeys(primaryKey, indexNames, indexKeys List, m_transaction.get());
353 354
354 } else { 355 } else {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 ASSERT(m_transaction->isFinished()); 586 ASSERT(m_transaction->isFinished());
586 587
587 // Break reference cycles. 588 // Break reference cycles.
588 m_indexMap.clear(); 589 m_indexMap.clear();
589 } 590 }
590 591
591 592
592 } // namespace WebCore 593 } // namespace WebCore
593 594
594 #endif // ENABLE(INDEXED_DATABASE) 595 #endif // ENABLE(INDEXED_DATABASE)
OLDNEW
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBDatabase.cpp ('k') | Source/WebCore/Modules/indexeddb/IDBRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698