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

eric at webkit.org eric at webkit.org
Thu Apr 8 00:48:48 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 3ddc18f841713695f8e6a9b88691e4da637338f8
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 24 17:03:40 2009 +0000

    2009-12-24  Shu Chang  <Chang.Shu at nokia.com>
    
            Reviewed by Laszlo Gombos.
    
            [Qt] Fix memory leak by deleting instance of ThreadPrivate
            in function waitForThreadCompletion(), synchronously, or in
            detachThread(), asynchronously.
            https://bugs.webkit.org/show_bug.cgi?id=32614
    
            * wtf/qt/ThreadingQt.cpp:
            (WTF::waitForThreadCompletion):
            (WTF::detachThread):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52550 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 3f901dc..3c5e9b4 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-24  Shu Chang  <Chang.Shu at nokia.com>
+
+        Reviewed by Laszlo Gombos.
+
+        [Qt] Fix memory leak by deleting instance of ThreadPrivate
+        in function waitForThreadCompletion(), synchronously, or in
+        detachThread(), asynchronously.
+        https://bugs.webkit.org/show_bug.cgi?id=32614 
+
+        * wtf/qt/ThreadingQt.cpp:
+        (WTF::waitForThreadCompletion):
+        (WTF::detachThread):
+
 2009-12-23  Kwang Yul Seo  <skyul at company100.net>
 
         Reviewed by Laszlo Gombos.
diff --git a/JavaScriptCore/wtf/qt/ThreadingQt.cpp b/JavaScriptCore/wtf/qt/ThreadingQt.cpp
index 9aee0ac..6e0e0de 100644
--- a/JavaScriptCore/wtf/qt/ThreadingQt.cpp
+++ b/JavaScriptCore/wtf/qt/ThreadingQt.cpp
@@ -180,11 +180,19 @@ int waitForThreadCompletion(ThreadIdentifier threadID, void** result)
     if (result)
         *result = static_cast<ThreadPrivate*>(thread)->getReturnValue();
 
+    delete thread;
+
     return !res;
 }
 
-void detachThread(ThreadIdentifier)
+void detachThread(ThreadIdentifier threadID)
 {
+    ASSERT(threadID);
+
+    QThread* thread = threadForIdentifier(threadID);
+    if (thread)
+        thread->deleteLater();
+    clearThreadForIdentifier(threadID);
 }
 
 ThreadIdentifier currentThread()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list