| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 NOTREACHED(); | 317 NOTREACHED(); |
| 318 return nullptr; | 318 return nullptr; |
| 319 } | 319 } |
| 320 #endif // DCHECK_IS_ON() | 320 #endif // DCHECK_IS_ON() |
| 321 | 321 |
| 322 void IDBRequest::onSuccess(PassRefPtr<IDBValue> prpValue) { | 322 void IDBRequest::onSuccess(PassRefPtr<IDBValue> prpValue) { |
| 323 IDB_TRACE("IDBRequest::onSuccess(IDBValue)"); | 323 IDB_TRACE("IDBRequest::onSuccess(IDBValue)"); |
| 324 if (!shouldEnqueueEvent()) | 324 if (!shouldEnqueueEvent()) |
| 325 return; | 325 return; |
| 326 | 326 |
| 327 RefPtr<IDBValue> value(prpValue); | 327 RefPtr<IDBValue> value(std::move(prpValue)); |
| 328 ackReceivedBlobs(value.get()); | 328 ackReceivedBlobs(value.get()); |
| 329 | 329 |
| 330 if (m_pendingCursor) { | 330 if (m_pendingCursor) { |
| 331 // Value should be null, signifying the end of the cursor's range. | 331 // Value should be null, signifying the end of the cursor's range. |
| 332 DCHECK(value->isNull()); | 332 DCHECK(value->isNull()); |
| 333 DCHECK(!value->blobInfo()->size()); | 333 DCHECK(!value->blobInfo()->size()); |
| 334 m_pendingCursor->close(); | 334 m_pendingCursor->close(); |
| 335 m_pendingCursor.clear(); | 335 m_pendingCursor.clear(); |
| 336 } | 336 } |
| 337 | 337 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 } | 552 } |
| 553 | 553 |
| 554 void IDBRequest::dequeueEvent(Event* event) { | 554 void IDBRequest::dequeueEvent(Event* event) { |
| 555 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 555 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
| 556 if (m_enqueuedEvents[i].get() == event) | 556 if (m_enqueuedEvents[i].get() == event) |
| 557 m_enqueuedEvents.remove(i); | 557 m_enqueuedEvents.remove(i); |
| 558 } | 558 } |
| 559 } | 559 } |
| 560 | 560 |
| 561 } // namespace blink | 561 } // namespace blink |
| OLD | NEW |