| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 { | 53 { |
| 54 IDBRequest* request = new IDBRequest(scriptState, source, transaction); | 54 IDBRequest* request = new IDBRequest(scriptState, source, transaction); |
| 55 request->suspendIfNeeded(); | 55 request->suspendIfNeeded(); |
| 56 // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames
) are not associated with transactions. | 56 // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames
) are not associated with transactions. |
| 57 if (transaction) | 57 if (transaction) |
| 58 transaction->registerRequest(request); | 58 transaction->registerRequest(request); |
| 59 return request; | 59 return request; |
| 60 } | 60 } |
| 61 | 61 |
| 62 IDBRequest::IDBRequest(ScriptState* scriptState, IDBAny* source, IDBTransaction*
transaction) | 62 IDBRequest::IDBRequest(ScriptState* scriptState, IDBAny* source, IDBTransaction*
transaction) |
| 63 : ActiveDOMObject(scriptState->getExecutionContext()) | 63 : ActiveScriptWrappable(this) |
| 64 , ActiveDOMObject(scriptState->getExecutionContext()) |
| 64 , m_transaction(transaction) | 65 , m_transaction(transaction) |
| 65 , m_scriptState(scriptState) | 66 , m_scriptState(scriptState) |
| 66 , m_source(source) | 67 , m_source(source) |
| 67 { | 68 { |
| 68 } | 69 } |
| 69 | 70 |
| 70 IDBRequest::~IDBRequest() | 71 IDBRequest::~IDBRequest() |
| 71 { | 72 { |
| 72 ASSERT(m_readyState == DONE || m_readyState == EarlyDeath || !getExecutionCo
ntext()); | 73 ASSERT(m_readyState == DONE || m_readyState == EarlyDeath || !getExecutionCo
ntext()); |
| 73 } | 74 } |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 | 531 |
| 531 void IDBRequest::dequeueEvent(Event* event) | 532 void IDBRequest::dequeueEvent(Event* event) |
| 532 { | 533 { |
| 533 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 534 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
| 534 if (m_enqueuedEvents[i].get() == event) | 535 if (m_enqueuedEvents[i].get() == event) |
| 535 m_enqueuedEvents.remove(i); | 536 m_enqueuedEvents.remove(i); |
| 536 } | 537 } |
| 537 } | 538 } |
| 538 | 539 |
| 539 } // namespace blink | 540 } // namespace blink |
| OLD | NEW |