Remove pointers to a database that failed to open from the
authordumi@chromium.org <dumi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Dec 2009 22:33:21 +0000 (22:33 +0000)
committerdumi@chromium.org <dumi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Dec 2009 22:33:21 +0000 (22:33 +0000)
DatabaseTracker and Document.

Reviewed by Dmitry Titov.

https://bugs.webkit.org/show_bug.cgi?id=32885

* storage/Database.cpp:
(WebCore::Database::openDatabase):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@52530 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/storage/Database.cpp

index 6fc8ffc21b1468aca57c4ecc71fbd520f256e624..7f6627c8d6c2f9729626626e166748cfd2b6cb60 100644 (file)
@@ -1,3 +1,15 @@
+2009-12-23  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Dmitry Titov.
+
+        Remove pointers to a database that failed to open from the
+        DatabaseTracker and Document.
+
+        https://bugs.webkit.org/show_bug.cgi?id=32885
+
+        * storage/Database.cpp:
+        (WebCore::Database::openDatabase):
+
 2009-12-23  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Darin Adler.
index 72414b49dade70c78c376548bdf36f45fb852563..62d4039af2a61021fc994dd1ef94ef151dda760d 100644 (file)
@@ -132,6 +132,8 @@ PassRefPtr<Database> Database::openDatabase(Document* document, const String& na
 
     if (!database->openAndVerifyVersion(e)) {
        LOG(StorageAPI, "Failed to open and verify version (expected %s) of database %s", expectedVersion.ascii().data(), database->databaseDebugName().ascii().data());
+       document->removeOpenDatabase(database.get());
+       DatabaseTracker::tracker().removeOpenDatabase(database.get());
        return 0;
     }