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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 IDBRequest::IDBRequest(ScriptState* scriptState, IDBAny* source, IDBTransaction*
transaction) | 58 IDBRequest::IDBRequest(ScriptState* scriptState, IDBAny* source, IDBTransaction*
transaction) |
59 : ActiveDOMObject(scriptState->executionContext()) | 59 : ActiveDOMObject(scriptState->executionContext()) |
60 , m_contextStopped(false) | 60 , m_contextStopped(false) |
61 , m_transaction(transaction) | 61 , m_transaction(transaction) |
62 , m_readyState(PENDING) | 62 , m_readyState(PENDING) |
63 , m_requestAborted(false) | 63 , m_requestAborted(false) |
64 , m_scriptState(scriptState) | 64 , m_scriptState(scriptState) |
65 , m_source(source) | 65 , m_source(source) |
66 , m_hasPendingActivity(true) | 66 , m_hasPendingActivity(true) |
67 , m_cursorType(IndexedDB::CursorKeyAndValue) | 67 , m_cursorType(IndexedDB::CursorKeyAndValue) |
68 , m_cursorDirection(blink::WebIDBCursor::Next) | 68 , m_cursorDirection(blink::WebIDBCursorDirectionNext) |
69 , m_pendingCursor(nullptr) | 69 , m_pendingCursor(nullptr) |
70 , m_didFireUpgradeNeededEvent(false) | 70 , m_didFireUpgradeNeededEvent(false) |
71 , m_preventPropagation(false) | 71 , m_preventPropagation(false) |
72 , m_resultDirty(true) | 72 , m_resultDirty(true) |
73 { | 73 { |
74 ScriptWrappable::init(this); | 74 ScriptWrappable::init(this); |
75 } | 75 } |
76 | 76 |
77 IDBRequest::~IDBRequest() | 77 IDBRequest::~IDBRequest() |
78 { | 78 { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 ASSERT_UNUSED(removed, removed); | 153 ASSERT_UNUSED(removed, removed); |
154 } | 154 } |
155 m_enqueuedEvents.clear(); | 155 m_enqueuedEvents.clear(); |
156 | 156 |
157 m_error.clear(); | 157 m_error.clear(); |
158 m_result.clear(); | 158 m_result.clear(); |
159 onError(DOMError::create(AbortError, "The transaction was aborted, so the re
quest cannot be fulfilled.")); | 159 onError(DOMError::create(AbortError, "The transaction was aborted, so the re
quest cannot be fulfilled.")); |
160 m_requestAborted = true; | 160 m_requestAborted = true; |
161 } | 161 } |
162 | 162 |
163 void IDBRequest::setCursorDetails(IndexedDB::CursorType cursorType, WebIDBCursor
::Direction direction) | 163 void IDBRequest::setCursorDetails(IndexedDB::CursorType cursorType, blink::WebID
BCursorDirection direction) |
164 { | 164 { |
165 ASSERT(m_readyState == PENDING); | 165 ASSERT(m_readyState == PENDING); |
166 ASSERT(!m_pendingCursor); | 166 ASSERT(!m_pendingCursor); |
167 m_cursorType = cursorType; | 167 m_cursorType = cursorType; |
168 m_cursorDirection = direction; | 168 m_cursorDirection = direction; |
169 } | 169 } |
170 | 170 |
171 void IDBRequest::setPendingCursor(IDBCursor* cursor) | 171 void IDBRequest::setPendingCursor(IDBCursor* cursor) |
172 { | 172 { |
173 ASSERT(m_readyState == DONE); | 173 ASSERT(m_readyState == DONE); |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 | 540 |
541 void IDBRequest::dequeueEvent(Event* event) | 541 void IDBRequest::dequeueEvent(Event* event) |
542 { | 542 { |
543 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { | 543 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { |
544 if (m_enqueuedEvents[i].get() == event) | 544 if (m_enqueuedEvents[i].get() == event) |
545 m_enqueuedEvents.remove(i); | 545 m_enqueuedEvents.remove(i); |
546 } | 546 } |
547 } | 547 } |
548 | 548 |
549 } // namespace WebCore | 549 } // namespace WebCore |
OLD | NEW |