| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 bool IDBOpenDBRequest::shouldEnqueueEvent() const | 156 bool IDBOpenDBRequest::shouldEnqueueEvent() const |
| 157 { | 157 { |
| 158 if (m_contextStopped || !executionContext()) | 158 if (m_contextStopped || !executionContext()) |
| 159 return false; | 159 return false; |
| 160 ASSERT(m_readyState == PENDING || m_readyState == DONE); | 160 ASSERT(m_readyState == PENDING || m_readyState == DONE); |
| 161 if (m_requestAborted) | 161 if (m_requestAborted) |
| 162 return false; | 162 return false; |
| 163 return true; | 163 return true; |
| 164 } | 164 } |
| 165 | 165 |
| 166 bool IDBOpenDBRequest::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event
) | 166 WebInputEventResult IDBOpenDBRequest::dispatchEventInternal(PassRefPtrWillBeRawP
tr<Event> event) |
| 167 { | 167 { |
| 168 // If the connection closed between onUpgradeNeeded and the delivery of the
"success" event, | 168 // If the connection closed between onUpgradeNeeded and the delivery of the
"success" event, |
| 169 // an "error" event should be fired instead. | 169 // an "error" event should be fired instead. |
| 170 if (event->type() == EventTypeNames::success && resultAsAny()->type() == IDB
Any::IDBDatabaseType && resultAsAny()->idbDatabase()->isClosePending()) { | 170 if (event->type() == EventTypeNames::success && resultAsAny()->type() == IDB
Any::IDBDatabaseType && resultAsAny()->idbDatabase()->isClosePending()) { |
| 171 dequeueEvent(event.get()); | 171 dequeueEvent(event.get()); |
| 172 setResult(nullptr); | 172 setResult(nullptr); |
| 173 onError(DOMException::create(AbortError, "The connection was closed.")); | 173 onError(DOMException::create(AbortError, "The connection was closed.")); |
| 174 return false; | 174 return WebInputEventResult::HandledSuppressed; |
| 175 } | 175 } |
| 176 | 176 |
| 177 return IDBRequest::dispatchEventInternal(event); | 177 return IDBRequest::dispatchEventInternal(event); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace blink | 180 } // namespace blink |
| OLD | NEW |