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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 Persistent<IDBDatabase> m_database; | 400 Persistent<IDBDatabase> m_database; |
401 const int64_t m_transactionId; | 401 const int64_t m_transactionId; |
402 const int64_t m_objectStoreId; | 402 const int64_t m_objectStoreId; |
403 const IDBIndexMetadata m_indexMetadata; | 403 const IDBIndexMetadata m_indexMetadata; |
404 }; | 404 }; |
405 } | 405 } |
406 | 406 |
407 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na
me, const IDBKeyPath& keyPath, const Dictionary& options, ExceptionState& except
ionState) | 407 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na
me, const IDBKeyPath& keyPath, const Dictionary& options, ExceptionState& except
ionState) |
408 { | 408 { |
409 bool unique = false; | 409 bool unique = false; |
410 DictionaryHelper::get(options, "unique", unique); | 410 options.get("unique", unique); |
411 | 411 |
412 bool multiEntry = false; | 412 bool multiEntry = false; |
413 DictionaryHelper::get(options, "multiEntry", multiEntry); | 413 options.get("multiEntry", multiEntry); |
414 | 414 |
415 return createIndex(scriptState, name, keyPath, unique, multiEntry, exception
State); | 415 return createIndex(scriptState, name, keyPath, unique, multiEntry, exception
State); |
416 } | 416 } |
417 | 417 |
418 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na
me, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionState& exc
eptionState) | 418 IDBIndex* IDBObjectStore::createIndex(ScriptState* scriptState, const String& na
me, const IDBKeyPath& keyPath, bool unique, bool multiEntry, ExceptionState& exc
eptionState) |
419 { | 419 { |
420 IDB_TRACE("IDBObjectStore::createIndex"); | 420 IDB_TRACE("IDBObjectStore::createIndex"); |
421 if (!m_transaction->isVersionChange()) { | 421 if (!m_transaction->isVersionChange()) { |
422 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::notVers
ionChangeTransactionErrorMessage); | 422 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::notVers
ionChangeTransactionErrorMessage); |
423 return 0; | 423 return 0; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 } | 682 } |
683 return IDBIndexMetadata::InvalidId; | 683 return IDBIndexMetadata::InvalidId; |
684 } | 684 } |
685 | 685 |
686 WebIDBDatabase* IDBObjectStore::backendDB() const | 686 WebIDBDatabase* IDBObjectStore::backendDB() const |
687 { | 687 { |
688 return m_transaction->backendDB(); | 688 return m_transaction->backendDB(); |
689 } | 689 } |
690 | 690 |
691 } // namespace blink | 691 } // namespace blink |
OLD | NEW |