| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 Persistent<IDBDatabase> m_database; | 379 Persistent<IDBDatabase> m_database; |
| 380 const int64_t m_transactionId; | 380 const int64_t m_transactionId; |
| 381 const int64_t m_objectStoreId; | 381 const int64_t m_objectStoreId; |
| 382 const IDBIndexMetadata m_indexMetadata; | 382 const IDBIndexMetadata m_indexMetadata; |
| 383 }; | 383 }; |
| 384 } | 384 } |
| 385 | 385 |
| 386 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na
me, const IDBKeyPath& keyPath, const Dictionary& options, ExceptionState& except
ionState) | 386 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na
me, const IDBKeyPath& keyPath, const Dictionary& options, ExceptionState& except
ionState) |
| 387 { | 387 { |
| 388 bool unique = false; | 388 bool unique = false; |
| 389 options.get("unique", unique); | 389 DictionaryHelper::get(options, "unique", unique); |
| 390 | 390 |
| 391 bool multiEntry = false; | 391 bool multiEntry = false; |
| 392 options.get("multiEntry", multiEntry); | 392 DictionaryHelper::get(options, "multiEntry", multiEntry); |
| 393 | 393 |
| 394 return createIndex(scriptState, name, keyPath, unique, multiEntry, exception
State); | 394 return createIndex(scriptState, name, keyPath, unique, multiEntry, exception
State); |
| 395 } | 395 } |
| 396 | 396 |
| 397 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na
me, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionState& exc
eptionState) | 397 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na
me, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionState& exc
eptionState) |
| 398 { | 398 { |
| 399 IDB_TRACE("IDBObjectStore::createIndex"); | 399 IDB_TRACE("IDBObjectStore::createIndex"); |
| 400 if (!m_transaction->isVersionChange()) { | 400 if (!m_transaction->isVersionChange()) { |
| 401 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::notVers
ionChangeTransactionErrorMessage); | 401 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::notVers
ionChangeTransactionErrorMessage); |
| 402 return 0; | 402 return 0; |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 } | 661 } |
| 662 return IDBIndexMetadata::InvalidId; | 662 return IDBIndexMetadata::InvalidId; |
| 663 } | 663 } |
| 664 | 664 |
| 665 WebIDBDatabase* IDBObjectStore::backendDB() const | 665 WebIDBDatabase* IDBObjectStore::backendDB() const |
| 666 { | 666 { |
| 667 return m_transaction->backendDB(); | 667 return m_transaction->backendDB(); |
| 668 } | 668 } |
| 669 | 669 |
| 670 } // namespace WebCore | 670 } // namespace WebCore |
| OLD | NEW |