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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 return request.release(); | 42 return request.release(); |
43 } | 43 } |
44 | 44 |
45 IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext* context, PassRefPtr<I
DBDatabaseCallbacksImpl> callbacks, int64_t transactionId, int64_t version) | 45 IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext* context, PassRefPtr<I
DBDatabaseCallbacksImpl> callbacks, int64_t transactionId, int64_t version) |
46 : IDBRequest(context, IDBAny::createNull(), IDBDatabaseBackendInterface::Nor
malTask, 0) | 46 : IDBRequest(context, IDBAny::createNull(), IDBDatabaseBackendInterface::Nor
malTask, 0) |
47 , m_databaseCallbacks(callbacks) | 47 , m_databaseCallbacks(callbacks) |
48 , m_transactionId(transactionId) | 48 , m_transactionId(transactionId) |
49 , m_version(version) | 49 , m_version(version) |
50 { | 50 { |
51 ASSERT(!m_result); | 51 ASSERT(!m_result); |
| 52 ScriptWrappable::init(this); |
52 } | 53 } |
53 | 54 |
54 IDBOpenDBRequest::~IDBOpenDBRequest() | 55 IDBOpenDBRequest::~IDBOpenDBRequest() |
55 { | 56 { |
56 } | 57 } |
57 | 58 |
58 const AtomicString& IDBOpenDBRequest::interfaceName() const | 59 const AtomicString& IDBOpenDBRequest::interfaceName() const |
59 { | 60 { |
60 return eventNames().interfaceForIDBOpenDBRequest; | 61 return eventNames().interfaceForIDBOpenDBRequest; |
61 } | 62 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 if (event->type() == eventNames().successEvent && m_result->type() == IDBAny
::IDBDatabaseType && m_result->idbDatabase()->isClosePending()) { | 146 if (event->type() == eventNames().successEvent && m_result->type() == IDBAny
::IDBDatabaseType && m_result->idbDatabase()->isClosePending()) { |
146 m_result.clear(); | 147 m_result.clear(); |
147 onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, "The
connection was closed.")); | 148 onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, "The
connection was closed.")); |
148 return false; | 149 return false; |
149 } | 150 } |
150 | 151 |
151 return IDBRequest::dispatchEvent(event); | 152 return IDBRequest::dispatchEvent(event); |
152 } | 153 } |
153 | 154 |
154 } // namespace WebCore | 155 } // namespace WebCore |
OLD | NEW |