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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 | 418 |
419 ASSERT(!es.hadException()); | 419 ASSERT(!es.hadException()); |
420 if (es.hadException()) | 420 if (es.hadException()) |
421 return 0; | 421 return 0; |
422 | 422 |
423 RefPtr<IDBRequest> indexRequest = openCursor(context, static_cast<IDBKeyRang
e*>(0), IndexedDB::CursorNext, IDBDatabaseBackendInterface::PreemptiveTask); | 423 RefPtr<IDBRequest> indexRequest = openCursor(context, static_cast<IDBKeyRang
e*>(0), IndexedDB::CursorNext, IDBDatabaseBackendInterface::PreemptiveTask); |
424 indexRequest->preventPropagation(); | 424 indexRequest->preventPropagation(); |
425 | 425 |
426 // This is kept alive by being the success handler of the request, which is
in turn kept alive by the owning transaction. | 426 // This is kept alive by being the success handler of the request, which is
in turn kept alive by the owning transaction. |
427 RefPtr<IndexPopulator> indexPopulator = IndexPopulator::create(backendDB(),
m_transaction->id(), id(), metadata); | 427 RefPtr<IndexPopulator> indexPopulator = IndexPopulator::create(backendDB(),
m_transaction->id(), id(), metadata); |
428 indexRequest->setOnsuccess(indexPopulator); | 428 indexRequest->setOnsuccess(indexPopulator, DOMWrapperWorld::current()); |
429 | 429 |
430 return index.release(); | 430 return index.release(); |
431 } | 431 } |
432 | 432 |
433 PassRefPtr<IDBIndex> IDBObjectStore::index(const String& name, ExceptionState& e
s) | 433 PassRefPtr<IDBIndex> IDBObjectStore::index(const String& name, ExceptionState& e
s) |
434 { | 434 { |
435 IDB_TRACE("IDBObjectStore::index"); | 435 IDB_TRACE("IDBObjectStore::index"); |
436 if (isDeleted()) { | 436 if (isDeleted()) { |
437 es.throwDOMException(InvalidStateError, IDBDatabase::objectStoreDeletedE
rrorMessage); | 437 es.throwDOMException(InvalidStateError, IDBDatabase::objectStoreDeletedE
rrorMessage); |
438 return 0; | 438 return 0; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 } | 613 } |
614 return IDBIndexMetadata::InvalidId; | 614 return IDBIndexMetadata::InvalidId; |
615 } | 615 } |
616 | 616 |
617 IDBDatabaseBackendInterface* IDBObjectStore::backendDB() const | 617 IDBDatabaseBackendInterface* IDBObjectStore::backendDB() const |
618 { | 618 { |
619 return m_transaction->backendDB(); | 619 return m_transaction->backendDB(); |
620 } | 620 } |
621 | 621 |
622 } // namespace WebCore | 622 } // namespace WebCore |
OLD | NEW |