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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 return nullptr; | 228 return nullptr; |
229 } | 229 } |
230 | 230 |
231 IDBRequest* request = IDBRequest::create(scriptState, IDBAny::create(this),
m_transaction.get()); | 231 IDBRequest* request = IDBRequest::create(scriptState, IDBAny::create(this),
m_transaction.get()); |
232 backendDB()->get(m_transaction->id(), m_objectStore->id(), m_metadata.id, ke
yRange, keyOnly, WebIDBCallbacksImpl::create(request).leakPtr()); | 232 backendDB()->get(m_transaction->id(), m_objectStore->id(), m_metadata.id, ke
yRange, keyOnly, WebIDBCallbacksImpl::create(request).leakPtr()); |
233 return request; | 233 return request; |
234 } | 234 } |
235 | 235 |
236 IDBRequest* IDBIndex::getAllInternal(ScriptState* scriptState, const ScriptValue
& range, unsigned long maxCount, ExceptionState& exceptionState, bool keyOnly) | 236 IDBRequest* IDBIndex::getAllInternal(ScriptState* scriptState, const ScriptValue
& range, unsigned long maxCount, ExceptionState& exceptionState, bool keyOnly) |
237 { | 237 { |
238 if (!maxCount) { | 238 if (!maxCount) |
239 exceptionState.throwTypeError(IDBDatabase::notValidMaxCountErrorMessage)
; | 239 maxCount = std::numeric_limits<uint32_t>::max(); |
240 return nullptr; | 240 |
241 } | |
242 if (isDeleted()) { | 241 if (isDeleted()) { |
243 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::indexDe
letedErrorMessage); | 242 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::indexDe
letedErrorMessage); |
244 return nullptr; | 243 return nullptr; |
245 } | 244 } |
246 if (m_transaction->isFinished() || m_transaction->isFinishing()) { | 245 if (m_transaction->isFinished() || m_transaction->isFinishing()) { |
247 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::
transactionFinishedErrorMessage); | 246 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::
transactionFinishedErrorMessage); |
248 return nullptr; | 247 return nullptr; |
249 } | 248 } |
250 if (!m_transaction->isActive()) { | 249 if (!m_transaction->isActive()) { |
251 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::
transactionInactiveErrorMessage); | 250 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::
transactionInactiveErrorMessage); |
(...skipping 17 matching lines...) Expand all Loading... |
269 { | 268 { |
270 return m_transaction->backendDB(); | 269 return m_transaction->backendDB(); |
271 } | 270 } |
272 | 271 |
273 bool IDBIndex::isDeleted() const | 272 bool IDBIndex::isDeleted() const |
274 { | 273 { |
275 return m_deleted || m_objectStore->isDeleted(); | 274 return m_deleted || m_objectStore->isDeleted(); |
276 } | 275 } |
277 | 276 |
278 } // namespace blink | 277 } // namespace blink |
OLD | NEW |