| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 , m_indexMetadata(indexMetadata) | 322 , m_indexMetadata(indexMetadata) |
| 323 { | 323 { |
| 324 } | 324 } |
| 325 | 325 |
| 326 virtual void handleEvent(ScriptExecutionContext*, Event* event) | 326 virtual void handleEvent(ScriptExecutionContext*, Event* event) |
| 327 { | 327 { |
| 328 ASSERT(event->type() == eventNames().successEvent); | 328 ASSERT(event->type() == eventNames().successEvent); |
| 329 EventTarget* target = event->target(); | 329 EventTarget* target = event->target(); |
| 330 IDBRequest* request = static_cast<IDBRequest*>(target); | 330 IDBRequest* request = static_cast<IDBRequest*>(target); |
| 331 | 331 |
| 332 RefPtr<IDBAny> cursorAny = request->result(ASSERT_NO_EXCEPTION_STATE); | 332 RefPtr<IDBAny> cursorAny = request->result(ASSERT_NO_EXCEPTION); |
| 333 RefPtr<IDBCursorWithValue> cursor; | 333 RefPtr<IDBCursorWithValue> cursor; |
| 334 if (cursorAny->type() == IDBAny::IDBCursorWithValueType) | 334 if (cursorAny->type() == IDBAny::IDBCursorWithValueType) |
| 335 cursor = cursorAny->idbCursorWithValue(); | 335 cursor = cursorAny->idbCursorWithValue(); |
| 336 | 336 |
| 337 Vector<int64_t, 1> indexIds; | 337 Vector<int64_t, 1> indexIds; |
| 338 indexIds.append(m_indexMetadata.id); | 338 indexIds.append(m_indexMetadata.id); |
| 339 if (cursor) { | 339 if (cursor) { |
| 340 cursor->continueFunction(static_cast<IDBKey*>(0), ASSERT_NO_EXCEPTIO
N_STATE); | 340 cursor->continueFunction(static_cast<IDBKey*>(0), ASSERT_NO_EXCEPTIO
N); |
| 341 | 341 |
| 342 RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey(); | 342 RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey(); |
| 343 ScriptValue value = cursor->value(); | 343 ScriptValue value = cursor->value(); |
| 344 | 344 |
| 345 IDBObjectStore::IndexKeys indexKeys; | 345 IDBObjectStore::IndexKeys indexKeys; |
| 346 generateIndexKeysForValue(request->requestState(), m_indexMetadata,
value, &indexKeys); | 346 generateIndexKeysForValue(request->requestState(), m_indexMetadata,
value, &indexKeys); |
| 347 | 347 |
| 348 Vector<IDBObjectStore::IndexKeys, 1> indexKeysList; | 348 Vector<IDBObjectStore::IndexKeys, 1> indexKeysList; |
| 349 indexKeysList.append(indexKeys); | 349 indexKeysList.append(indexKeys); |
| 350 | 350 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 } | 594 } |
| 595 return IDBIndexMetadata::InvalidId; | 595 return IDBIndexMetadata::InvalidId; |
| 596 } | 596 } |
| 597 | 597 |
| 598 IDBDatabaseBackendInterface* IDBObjectStore::backendDB() const | 598 IDBDatabaseBackendInterface* IDBObjectStore::backendDB() const |
| 599 { | 599 { |
| 600 return m_transaction->backendDB(); | 600 return m_transaction->backendDB(); |
| 601 } | 601 } |
| 602 | 602 |
| 603 } // namespace WebCore | 603 } // namespace WebCore |
| OLD | NEW |