| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 setResultCursor(m_pendingCursor.release(), key, primaryKey, std::move(value)); | 379 setResultCursor(m_pendingCursor.release(), key, primaryKey, std::move(value)); |
| 380 } | 380 } |
| 381 | 381 |
| 382 bool IDBRequest::hasPendingActivity() const { | 382 bool IDBRequest::hasPendingActivity() const { |
| 383 // FIXME: In an ideal world, we should return true as long as anyone has a or | 383 // FIXME: In an ideal world, we should return true as long as anyone has a or |
| 384 // can get a handle to us and we have event listeners. This is order to | 384 // can get a handle to us and we have event listeners. This is order to |
| 385 // handle user generated events properly. | 385 // handle user generated events properly. |
| 386 return m_hasPendingActivity && getExecutionContext(); | 386 return m_hasPendingActivity && getExecutionContext(); |
| 387 } | 387 } |
| 388 | 388 |
| 389 void IDBRequest::contextDestroyed() { | 389 void IDBRequest::contextDestroyed(ExecutionContext*) { |
| 390 if (m_readyState == PENDING) { | 390 if (m_readyState == PENDING) { |
| 391 m_readyState = EarlyDeath; | 391 m_readyState = EarlyDeath; |
| 392 if (m_transaction) { | 392 if (m_transaction) { |
| 393 m_transaction->unregisterRequest(this); | 393 m_transaction->unregisterRequest(this); |
| 394 m_transaction.clear(); | 394 m_transaction.clear(); |
| 395 } | 395 } |
| 396 } | 396 } |
| 397 | 397 |
| 398 m_enqueuedEvents.clear(); | 398 m_enqueuedEvents.clear(); |
| 399 if (m_source) | 399 if (m_source) |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 } | 549 } |
| 550 | 550 |
| 551 void IDBRequest::dequeueEvent(Event* event) { | 551 void IDBRequest::dequeueEvent(Event* event) { |
| 552 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 552 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
| 553 if (m_enqueuedEvents[i].get() == event) | 553 if (m_enqueuedEvents[i].get() == event) |
| 554 m_enqueuedEvents.remove(i); | 554 m_enqueuedEvents.remove(i); |
| 555 } | 555 } |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace blink | 558 } // namespace blink |
| OLD | NEW |