| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 389 } |
| 390 if (!m_transaction->isActive()) { | 390 if (!m_transaction->isActive()) { |
| 391 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::
transactionInactiveErrorMessage); | 391 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::
transactionInactiveErrorMessage); |
| 392 return 0; | 392 return 0; |
| 393 } | 393 } |
| 394 if (!keyPath.isValid()) { | 394 if (!keyPath.isValid()) { |
| 395 exceptionState.throwDOMException(SyntaxError, "The keyPath argument cont
ains an invalid key path."); | 395 exceptionState.throwDOMException(SyntaxError, "The keyPath argument cont
ains an invalid key path."); |
| 396 return 0; | 396 return 0; |
| 397 } | 397 } |
| 398 if (name.isNull()) { | 398 if (name.isNull()) { |
| 399 exceptionState.throwUninformativeAndGenericTypeError(); | 399 exceptionState.throwTypeError("The name provided is null."); |
| 400 return 0; | 400 return 0; |
| 401 } | 401 } |
| 402 if (containsIndex(name)) { | 402 if (containsIndex(name)) { |
| 403 exceptionState.throwDOMException(ConstraintError, "An index with the spe
cified name already exists."); | 403 exceptionState.throwDOMException(ConstraintError, "An index with the spe
cified name already exists."); |
| 404 return 0; | 404 return 0; |
| 405 } | 405 } |
| 406 | 406 |
| 407 if (keyPath.type() == IDBKeyPath::ArrayType && multiEntry) { | 407 if (keyPath.type() == IDBKeyPath::ArrayType && multiEntry) { |
| 408 exceptionState.throwDOMException(InvalidAccessError, "The keyPath argume
nt was an array and the multiEntry option is true."); | 408 exceptionState.throwDOMException(InvalidAccessError, "The keyPath argume
nt was an array and the multiEntry option is true."); |
| 409 return 0; | 409 return 0; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 } | 617 } |
| 618 return IDBIndexMetadata::InvalidId; | 618 return IDBIndexMetadata::InvalidId; |
| 619 } | 619 } |
| 620 | 620 |
| 621 WebIDBDatabase* IDBObjectStore::backendDB() const | 621 WebIDBDatabase* IDBObjectStore::backendDB() const |
| 622 { | 622 { |
| 623 return m_transaction->backendDB(); | 623 return m_transaction->backendDB(); |
| 624 } | 624 } |
| 625 | 625 |
| 626 } // namespace WebCore | 626 } // namespace WebCore |
| OLD | NEW |