Changeset 207896 in webkit


Ignore:
Timestamp:
Oct 26, 2016 6:24:12 AM (7 years ago)
Author:
akling@apple.com
Message:

Fix mach port leak in ResourceUsageThread.
<https://webkit.org/b/164012>

Reviewed by Antti Koivisto.

The threads returned by task_threads() need to be deallocated.

  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::cpuUsage):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207895 r207896  
     12016-10-26  Andreas Kling  <akling@apple.com>
     2
     3        Fix mach port leak in ResourceUsageThread.
     4        <https://webkit.org/b/164012>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        The threads returned by task_threads() need to be deallocated.
     9
     10        * page/cocoa/ResourceUsageThreadCocoa.mm:
     11        (WebCore::cpuUsage):
     12
    1132016-10-26  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
    214
  • trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm

    r204987 r207896  
    165165        if (!(threadBasicInfo->flags & TH_FLAGS_IDLE))
    166166            usage += threadBasicInfo->cpu_usage / static_cast<float>(TH_USAGE_SCALE) * 100.0;
     167
     168        mach_port_deallocate(mach_task_self(), threadList[i]);
    167169    }
    168170
Note: See TracChangeset for help on using the changeset viewer.