OLD | NEW |
---|---|
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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
330 indexIds.append(m_indexMetadata.id); | 330 indexIds.append(m_indexMetadata.id); |
331 if (cursor) { | 331 if (cursor) { |
332 cursor->continueFunction(static_cast<IDBKey*>(0), ASSERT_NO_EXCEPTIO N); | 332 cursor->continueFunction(static_cast<IDBKey*>(0), ASSERT_NO_EXCEPTIO N); |
333 | 333 |
334 RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey(); | 334 RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey(); |
335 ScriptValue value = cursor->value(context); | 335 ScriptValue value = cursor->value(context); |
336 | 336 |
337 IDBObjectStore::IndexKeys indexKeys; | 337 IDBObjectStore::IndexKeys indexKeys; |
338 generateIndexKeysForValue(request->requestState(), m_indexMetadata, value, &indexKeys); | 338 generateIndexKeysForValue(request->requestState(), m_indexMetadata, value, &indexKeys); |
339 | 339 |
340 Vector<IDBObjectStore::IndexKeys, 1> indexKeysList; | 340 Vector<IDBObjectStore::IndexKeys, 1> indexKeysList; |
jsbell
2013/09/11 15:44:02
Given that this just results in copies for passing
| |
341 indexKeysList.append(indexKeys); | 341 indexKeysList.append(indexKeys); |
342 | 342 |
343 m_databaseBackend->setIndexKeys(m_transactionId, m_objectStoreId, pr imaryKey, indexIds, indexKeysList); | 343 m_databaseBackend->setIndexKeys(m_transactionId, m_objectStoreId, pr imaryKey, Vector<int64_t>(indexIds), Vector<IDBObjectStore::IndexKeys>(indexKeys List)); |
344 } else { | 344 } else { |
345 // Now that we are done indexing, tell the backend to go | 345 // Now that we are done indexing, tell the backend to go |
346 // back to processing tasks of type NormalTask. | 346 // back to processing tasks of type NormalTask. |
347 m_databaseBackend->setIndexesReady(m_transactionId, m_objectStoreId, indexIds); | 347 m_databaseBackend->setIndexesReady(m_transactionId, m_objectStoreId, Vector<int64_t>(indexIds)); |
348 m_databaseBackend.clear(); | 348 m_databaseBackend.clear(); |
349 } | 349 } |
350 | 350 |
351 } | 351 } |
352 | 352 |
353 RefPtr<IDBDatabaseBackendInterface> m_databaseBackend; | 353 RefPtr<IDBDatabaseBackendInterface> m_databaseBackend; |
354 const int64_t m_transactionId; | 354 const int64_t m_transactionId; |
355 const int64_t m_objectStoreId; | 355 const int64_t m_objectStoreId; |
356 const IDBIndexMetadata m_indexMetadata; | 356 const IDBIndexMetadata m_indexMetadata; |
357 }; | 357 }; |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
582 } | 582 } |
583 return IDBIndexMetadata::InvalidId; | 583 return IDBIndexMetadata::InvalidId; |
584 } | 584 } |
585 | 585 |
586 IDBDatabaseBackendInterface* IDBObjectStore::backendDB() const | 586 IDBDatabaseBackendInterface* IDBObjectStore::backendDB() const |
587 { | 587 { |
588 return m_transaction->backendDB(); | 588 return m_transaction->backendDB(); |
589 } | 589 } |
590 | 590 |
591 } // namespace WebCore | 591 } // namespace WebCore |
OLD | NEW |