[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:27:03 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 428032c91ab2c03e99a71495186a953d7ae22a97
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 18:23:17 2009 +0000

    2009-11-09  Kevin Watters  <kevinwatters at gmail.com>
    
            Reviewed by Darin Adler.
    
            Thunk to the main thread from ~Database to deref Database's m_document.
    
            If the Database was the Document's last referrer, then ~Document occurs on the
            Database thread, and ASSERT(!m_styleRecalcTimer.isActive()) hits a main thread
            ASSERT in debug builds.
    
            * storage/Database.cpp:
            (WebCore::derefDocument):
            (WebCore::Database::~Database):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50666 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6528fdc..daaa979 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-11-09  Kevin Watters  <kevinwatters at gmail.com>
+
+        Reviewed by Darin Adler.
+
+        Thunk to the main thread from ~Database to deref Database's m_document.
+
+        If the Database was the Document's last referrer, then ~Document occurs on the
+        Database thread, and ASSERT(!m_styleRecalcTimer.isActive()) hits a main thread
+        ASSERT in debug builds.
+
+        * storage/Database.cpp:
+        (WebCore::derefDocument):
+        (WebCore::Database::~Database):
+
 2009-11-09  Mark Mentovai  <mark at chromium.org>
 
         Reviewed by Dan Bernstein.
diff --git a/WebCore/storage/Database.cpp b/WebCore/storage/Database.cpp
index 5c26c5b..29dec26 100644
--- a/WebCore/storage/Database.cpp
+++ b/WebCore/storage/Database.cpp
@@ -191,6 +191,11 @@ Database::Database(Document* document, const String& name, const String& expecte
     m_document->addOpenDatabase(this);
 }
 
+static void derefDocument(void* document)
+{
+    static_cast<Document*>(document)->deref();
+}
+
 Database::~Database()
 {
     if (m_document->databaseThread())
@@ -198,6 +203,9 @@ Database::~Database()
 
     DatabaseTracker::tracker().removeOpenDatabase(this);
     m_document->removeOpenDatabase(this);
+
+    // Deref m_document on the main thread.
+    callOnMainThread(derefDocument, m_document.release().releaseRef());
 }
 
 bool Database::openAndVerifyVersion(ExceptionCode& e)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list