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 30 matching lines...) Expand all Loading... |
41 #include "modules/indexeddb/IDBTracing.h" | 41 #include "modules/indexeddb/IDBTracing.h" |
42 #include "platform/SharedBuffer.h" | 42 #include "platform/SharedBuffer.h" |
43 #include "public/platform/WebBlobInfo.h" | 43 #include "public/platform/WebBlobInfo.h" |
44 | 44 |
45 using blink::WebIDBCursor; | 45 using blink::WebIDBCursor; |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 IDBRequest* IDBRequest::create(ScriptState* scriptState, IDBAny* source, IDBTran
saction* transaction) | 49 IDBRequest* IDBRequest::create(ScriptState* scriptState, IDBAny* source, IDBTran
saction* transaction) |
50 { | 50 { |
51 IDBRequest* request = adoptRefCountedGarbageCollectedWillBeNoop(new IDBReque
st(scriptState, source, transaction)); | 51 IDBRequest* request = new IDBRequest(scriptState, source, transaction); |
52 request->suspendIfNeeded(); | 52 request->suspendIfNeeded(); |
53 // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames
) are not associated with transactions. | 53 // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames
) are not associated with transactions. |
54 if (transaction) | 54 if (transaction) |
55 transaction->registerRequest(request); | 55 transaction->registerRequest(request); |
56 return request; | 56 return request; |
57 } | 57 } |
58 | 58 |
59 IDBRequest::IDBRequest(ScriptState* scriptState, IDBAny* source, IDBTransaction*
transaction) | 59 IDBRequest::IDBRequest(ScriptState* scriptState, IDBAny* source, IDBTransaction*
transaction) |
60 : ActiveDOMObject(scriptState->executionContext()) | 60 : ActiveDOMObject(scriptState->executionContext()) |
61 , m_contextStopped(false) | 61 , m_contextStopped(false) |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 | 550 |
551 void IDBRequest::dequeueEvent(Event* event) | 551 void IDBRequest::dequeueEvent(Event* event) |
552 { | 552 { |
553 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 553 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
554 if (m_enqueuedEvents[i].get() == event) | 554 if (m_enqueuedEvents[i].get() == event) |
555 m_enqueuedEvents.remove(i); | 555 m_enqueuedEvents.remove(i); |
556 } | 556 } |
557 } | 557 } |
558 | 558 |
559 } // namespace blink | 559 } // namespace blink |
OLD | NEW |