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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 if (!m_transaction->isActive()) { | 161 if (!m_transaction->isActive()) { |
162 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::
transactionInactiveErrorMessage); | 162 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::
transactionInactiveErrorMessage); |
163 return 0; | 163 return 0; |
164 } | 164 } |
165 if (m_transaction->isReadOnly()) { | 165 if (m_transaction->isReadOnly()) { |
166 exceptionState.throwUninformativeAndGenericDOMException(ReadOnlyError); | 166 exceptionState.throwUninformativeAndGenericDOMException(ReadOnlyError); |
167 return 0; | 167 return 0; |
168 } | 168 } |
169 | 169 |
170 // FIXME: Make SerializedScriptValue::create etc take an ExceptionState or u
se ScriptState::setDOMException. | 170 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::creat
e(value, exceptionState, state); |
171 bool didThrow = false; | 171 if (exceptionState.hadException()) |
172 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::creat
e(value, didThrow, state); | |
173 if (didThrow) | |
174 return 0; | 172 return 0; |
175 | 173 |
176 if (serializedValue->containsBlobs()) { | 174 if (serializedValue->containsBlobs()) { |
177 // FIXME: Add Blob/File/FileList support | 175 // FIXME: Add Blob/File/FileList support |
178 exceptionState.throwUninformativeAndGenericDOMException(DataCloneError); | 176 exceptionState.throwUninformativeAndGenericDOMException(DataCloneError); |
179 return 0; | 177 return 0; |
180 } | 178 } |
181 | 179 |
182 const IDBKeyPath& keyPath = m_metadata.keyPath; | 180 const IDBKeyPath& keyPath = m_metadata.keyPath; |
183 const bool usesInLineKeys = !keyPath.isNull(); | 181 const bool usesInLineKeys = !keyPath.isNull(); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 } | 617 } |
620 return IDBIndexMetadata::InvalidId; | 618 return IDBIndexMetadata::InvalidId; |
621 } | 619 } |
622 | 620 |
623 WebIDBDatabase* IDBObjectStore::backendDB() const | 621 WebIDBDatabase* IDBObjectStore::backendDB() const |
624 { | 622 { |
625 return m_transaction->backendDB(); | 623 return m_transaction->backendDB(); |
626 } | 624 } |
627 | 625 |
628 } // namespace WebCore | 626 } // namespace WebCore |
OLD | NEW |