Changeset 52550 in webkit


Ignore:
Timestamp:
Dec 24, 2009 9:03:40 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-24 Shu Chang <Chang.Shu@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):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r52538 r52550  
     12009-12-24  Shu Chang  <Chang.Shu@nokia.com>
     2
     3        Reviewed by Laszlo Gombos.
     4
     5        [Qt] Fix memory leak by deleting instance of ThreadPrivate
     6        in function waitForThreadCompletion(), synchronously, or in
     7        detachThread(), asynchronously.
     8        https://bugs.webkit.org/show_bug.cgi?id=32614
     9
     10        * wtf/qt/ThreadingQt.cpp:
     11        (WTF::waitForThreadCompletion):
     12        (WTF::detachThread):
     13
    1142009-12-23  Kwang Yul Seo  <skyul@company100.net>
    215
  • trunk/JavaScriptCore/wtf/qt/ThreadingQt.cpp

    r52355 r52550  
    181181        *result = static_cast<ThreadPrivate*>(thread)->getReturnValue();
    182182
     183    delete thread;
     184
    183185    return !res;
    184186}
    185187
    186 void detachThread(ThreadIdentifier)
    187 {
     188void detachThread(ThreadIdentifier threadID)
     189{
     190    ASSERT(threadID);
     191
     192    QThread* thread = threadForIdentifier(threadID);
     193    if (thread)
     194        thread->deleteLater();
     195    clearThreadForIdentifier(threadID);
    188196}
    189197
Note: See TracChangeset for help on using the changeset viewer.