IndexedDB: Crash on checking version of corrupt backing store
authorjsbell <jsbell@chromium.org>
Mon, 29 Oct 2012 21:20:14 +0000 (21:20 +0000)
committerjsbell <jsbell@chromium.org>
Mon, 29 Oct 2012 21:20:14 +0000 (21:20 +0000)
commited6477fc034b003dc01074fa14cb4a73a3d622ba
tree432b2cac6b2ed40acf3b6180ea3d7d41ad03b72a
parent27a4eb0f4ea0a0430f6dfa5cee9c253047ae5723
IndexedDB: Crash on checking version of corrupt backing store
https://bugs.webkit.org/show_bug.cgi?id=100692

Reviewed by Tony Chang.

If the backing store fails to open (due to corruption, non-writeable disk, etc)
the subsequent schema version check dereferences a null pointer. Fix to only
do the schema check if the database opened.

Chromium tests will be included with crrev.com/11196029

* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::open):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp