Skip to content

Commit 7fd8405

Browse files
inexorabletashwebkit-commit-queue
authored andcommitted
IndexedDB: Object stores not persisting between sessions
https://bugs.webkit.org/show_bug.cgi?id=71313 Patch by Joshua Bell <jsbell@chromium.org> on 2011-11-03 Reviewed by Tony Chang. Logic flaw introduced with r98806 skipped the loading of object stores during subsequent sessions. * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl): (WebCore::IDBDatabaseBackendImpl::openInternal): Canonical link: https://commits.webkit.org/87808@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 6d225df commit 7fd8405

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

Source/WebCore/ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2011-11-03 Joshua Bell <jsbell@chromium.org>
2+
3+
IndexedDB: Object stores not persisting between sessions
4+
https://bugs.webkit.org/show_bug.cgi?id=71313
5+
6+
Reviewed by Tony Chang.
7+
8+
Logic flaw introduced with r98806 skipped the loading of object stores
9+
during subsequent sessions.
10+
11+
* storage/IDBDatabaseBackendImpl.cpp:
12+
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
13+
(WebCore::IDBDatabaseBackendImpl::openInternal):
14+
115
2011-11-03 Pavel Feldman <pfeldman@google.com>
216

317
Web Inspector: fix heap profiler rendering and resize.

Source/WebCore/storage/IDBDatabaseBackendImpl.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,19 @@ IDBDatabaseBackendImpl::IDBDatabaseBackendImpl(const String& name, IDBBackingSto
103103
, m_transactionCoordinator(coordinator)
104104
{
105105
ASSERT(!m_name.isNull());
106-
107-
bool success = m_backingStore->getIDBDatabaseMetaData(m_name, m_version, m_id);
108-
ASSERT(success == (m_id != InvalidId));
109-
if (!success)
110-
openInternal();
106+
openInternal();
111107
}
112108

113109
void IDBDatabaseBackendImpl::openInternal()
114110
{
111+
bool success = m_backingStore->getIDBDatabaseMetaData(m_name, m_version, m_id);
112+
ASSERT(success == (m_id != InvalidId));
113+
if (success) {
114+
loadObjectStores();
115+
return;
116+
}
115117
if (!m_backingStore->createIDBDatabaseMetaData(m_name, m_version, m_id))
116118
ASSERT_NOT_REACHED(); // FIXME: Need better error handling.
117-
loadObjectStores();
118119
}
119120

120121
IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl()

0 commit comments

Comments
 (0)