| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 objectStoreNames->append(it->first); | 110 objectStoreNames->append(it->first); |
| 111 objectStoreNames->sort(); | 111 objectStoreNames->sort(); |
| 112 return objectStoreNames.release(); | 112 return objectStoreNames.release(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 PassRefPtr<IDBAny> IDBDatabase::version() const | 115 PassRefPtr<IDBAny> IDBDatabase::version() const |
| 116 { | 116 { |
| 117 int64_t intVersion = m_metadata.intVersion; | 117 int64_t intVersion = m_metadata.intVersion; |
| 118 if (intVersion == IDBDatabaseMetadata::NoIntVersion) | 118 if (intVersion == IDBDatabaseMetadata::NoIntVersion) |
| 119 return IDBAny::createString(m_metadata.version); | 119 return IDBAny::createString(m_metadata.version); |
| 120 return IDBAny::create(intVersion); | 120 return IDBAny::create(SerializedScriptValue::numberValue(intVersion)); |
| 121 } | 121 } |
| 122 | 122 |
| 123 PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co
nst Dictionary& options, ExceptionCode& ec) | 123 PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co
nst Dictionary& options, ExceptionCode& ec) |
| 124 { | 124 { |
| 125 if (!m_versionChangeTransaction) { | 125 if (!m_versionChangeTransaction) { |
| 126 ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; | 126 ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; |
| 127 return 0; | 127 return 0; |
| 128 } | 128 } |
| 129 if (!m_versionChangeTransaction->isActive()) { | 129 if (!m_versionChangeTransaction->isActive()) { |
| 130 ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR; | 130 ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 } | 380 } |
| 381 | 381 |
| 382 EventTargetData* IDBDatabase::ensureEventTargetData() | 382 EventTargetData* IDBDatabase::ensureEventTargetData() |
| 383 { | 383 { |
| 384 return &m_eventTargetData; | 384 return &m_eventTargetData; |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace WebCore | 387 } // namespace WebCore |
| 388 | 388 |
| 389 #endif // ENABLE(INDEXED_DATABASE) | 389 #endif // ENABLE(INDEXED_DATABASE) |
| OLD | NEW |