| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 m_pendingCursor.clear(); | 243 m_pendingCursor.clear(); |
| 244 enqueueEvent(Event::createCancelableBubble(EventTypeNames::error)); | 244 enqueueEvent(Event::createCancelableBubble(EventTypeNames::error)); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void IDBRequest::onSuccess(const Vector<String>& stringList) | 247 void IDBRequest::onSuccess(const Vector<String>& stringList) |
| 248 { | 248 { |
| 249 IDB_TRACE("IDBRequest::onSuccess(StringList)"); | 249 IDB_TRACE("IDBRequest::onSuccess(StringList)"); |
| 250 if (!shouldEnqueueEvent()) | 250 if (!shouldEnqueueEvent()) |
| 251 return; | 251 return; |
| 252 | 252 |
| 253 RefPtrWillBeRawPtr<DOMStringList> domStringList = DOMStringList::create(); | 253 RefPtrWillBeRawPtr<DOMStringList> domStringList = DOMStringList::create(DOMS
tringList::IndexedDB); |
| 254 for (size_t i = 0; i < stringList.size(); ++i) | 254 for (size_t i = 0; i < stringList.size(); ++i) |
| 255 domStringList->append(stringList[i]); | 255 domStringList->append(stringList[i]); |
| 256 onSuccessInternal(IDBAny::create(domStringList.release())); | 256 onSuccessInternal(IDBAny::create(domStringList.release())); |
| 257 } | 257 } |
| 258 | 258 |
| 259 void IDBRequest::onSuccess(PassOwnPtr<WebIDBCursor> backend, IDBKey* key, IDBKey
* primaryKey, PassRefPtr<IDBValue> value) | 259 void IDBRequest::onSuccess(PassOwnPtr<WebIDBCursor> backend, IDBKey* key, IDBKey
* primaryKey, PassRefPtr<IDBValue> value) |
| 260 { | 260 { |
| 261 IDB_TRACE("IDBRequest::onSuccess(IDBCursor)"); | 261 IDB_TRACE("IDBRequest::onSuccess(IDBCursor)"); |
| 262 if (!shouldEnqueueEvent()) | 262 if (!shouldEnqueueEvent()) |
| 263 return; | 263 return; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 void IDBRequest::dequeueEvent(Event* event) | 542 void IDBRequest::dequeueEvent(Event* event) |
| 543 { | 543 { |
| 544 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 544 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
| 545 if (m_enqueuedEvents[i].get() == event) | 545 if (m_enqueuedEvents[i].get() == event) |
| 546 m_enqueuedEvents.remove(i); | 546 m_enqueuedEvents.remove(i); |
| 547 } | 547 } |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace blink | 550 } // namespace blink |
| OLD | NEW |