OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 hashSet->add(this); | 205 hashSet->add(this); |
206 } | 206 } |
207 | 207 |
208 m_filename = DatabaseTracker::tracker().fullPathForDatabase(securityOrigin()
, m_name); | 208 m_filename = DatabaseTracker::tracker().fullPathForDatabase(securityOrigin()
, m_name); |
209 DatabaseTracker::tracker().addOpenDatabase(this); | 209 DatabaseTracker::tracker().addOpenDatabase(this); |
210 } | 210 } |
211 | 211 |
212 AbstractDatabase::~AbstractDatabase() | 212 AbstractDatabase::~AbstractDatabase() |
213 { | 213 { |
| 214 ASSERT(!m_opened); |
214 } | 215 } |
215 | 216 |
216 void AbstractDatabase::closeDatabase() | 217 void AbstractDatabase::closeDatabase() |
217 { | 218 { |
218 if (!m_opened) | 219 if (!m_opened) |
219 return; | 220 return; |
220 | 221 |
221 m_sqliteDatabase.close(); | 222 m_sqliteDatabase.close(); |
222 m_opened = false; | 223 m_opened = false; |
223 { | 224 { |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 | 535 |
535 bool AbstractDatabase::isInterrupted() | 536 bool AbstractDatabase::isInterrupted() |
536 { | 537 { |
537 MutexLocker locker(m_sqliteDatabase.databaseMutex()); | 538 MutexLocker locker(m_sqliteDatabase.databaseMutex()); |
538 return m_sqliteDatabase.isInterrupted(); | 539 return m_sqliteDatabase.isInterrupted(); |
539 } | 540 } |
540 | 541 |
541 } // namespace WebCore | 542 } // namespace WebCore |
542 | 543 |
543 #endif // ENABLE(SQL_DATABASE) | 544 #endif // ENABLE(SQL_DATABASE) |
OLD | NEW |