| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 setResultCursor(m_pendingCursor.release(), key, primaryKey, std::move(value)); | 367 setResultCursor(m_pendingCursor.release(), key, primaryKey, std::move(value)); |
| 368 } | 368 } |
| 369 | 369 |
| 370 bool IDBRequest::hasPendingActivity() const { | 370 bool IDBRequest::hasPendingActivity() const { |
| 371 // FIXME: In an ideal world, we should return true as long as anyone has a or
can | 371 // FIXME: In an ideal world, we should return true as long as anyone has a or
can |
| 372 // get a handle to us and we have event listeners. This is order to han
dle | 372 // get a handle to us and we have event listeners. This is order to han
dle |
| 373 // user generated events properly. | 373 // user generated events properly. |
| 374 return m_hasPendingActivity && !m_contextStopped; | 374 return m_hasPendingActivity && !m_contextStopped; |
| 375 } | 375 } |
| 376 | 376 |
| 377 void IDBRequest::stop() { | 377 void IDBRequest::contextDestroyed() { |
| 378 if (m_contextStopped) | 378 if (m_contextStopped) |
| 379 return; | 379 return; |
| 380 | 380 |
| 381 m_contextStopped = true; | 381 m_contextStopped = true; |
| 382 | 382 |
| 383 if (m_readyState == PENDING) { | 383 if (m_readyState == PENDING) { |
| 384 m_readyState = EarlyDeath; | 384 m_readyState = EarlyDeath; |
| 385 if (m_transaction) { | 385 if (m_transaction) { |
| 386 m_transaction->unregisterRequest(this); | 386 m_transaction->unregisterRequest(this); |
| 387 m_transaction.clear(); | 387 m_transaction.clear(); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 } | 536 } |
| 537 | 537 |
| 538 void IDBRequest::dequeueEvent(Event* event) { | 538 void IDBRequest::dequeueEvent(Event* event) { |
| 539 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 539 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
| 540 if (m_enqueuedEvents[i].get() == event) | 540 if (m_enqueuedEvents[i].get() == event) |
| 541 m_enqueuedEvents.remove(i); | 541 m_enqueuedEvents.remove(i); |
| 542 } | 542 } |
| 543 } | 543 } |
| 544 | 544 |
| 545 } // namespace blink | 545 } // namespace blink |
| OLD | NEW |