Reviewed by Mark Rowe.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2007 17:53:23 +0000 (17:53 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Dec 2007 17:53:23 +0000 (17:53 +0000)
        - fix http://bugs.webkit.org/show_bug.cgi?id=16468
          REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html

        * storage/DatabaseThread.cpp:
        (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
        because there's no guarantee it won't lose its last reference otherwise.

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

WebCore/ChangeLog
WebCore/storage/DatabaseThread.cpp

index a0b6b3580426cc09ab3cdff80bb8c223dc326c34..3b7877c65e12787e37f7cda09e4d1417d3d4bac4 100644 (file)
@@ -1,3 +1,14 @@
+2007-12-17  Darin Adler  <darin@apple.com>
+
+        Reviewed by Mark Rowe.
+
+        - fix http://bugs.webkit.org/show_bug.cgi?id=16468
+          REGRESSION(r28781): Crash running storage/transaction_callback_exception_crash.html
+
+        * storage/DatabaseThread.cpp:
+        (WebCore::DatabaseThread::dispatchNextTaskIdentifier): Use a RefPtr for the database
+        because there's no guarantee it won't lose its last reference otherwise.
+
 2007-12-17  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Maciej Stachowiak.
index 317230234d84f272b0e465e05a6536f83ad7f348..63fe148796c3cfc06240bba96ee7173abefad837 100644 (file)
@@ -155,7 +155,7 @@ void* DatabaseThread::databaseThread()
 
 bool DatabaseThread::dispatchNextTaskIdentifier()
 {
-    Database* workDatabase = 0;
+    RefPtr<Database> workDatabase;
     RefPtr<DatabaseTask> task;
 
     {
@@ -179,7 +179,7 @@ bool DatabaseThread::dispatchNextTaskIdentifier()
     if (task) {
         ASSERT(workDatabase);
         workDatabase->resetAuthorizer();
-        task->performTask(workDatabase);
+        task->performTask(workDatabase.get());
         return true;
     }