Title: [207896] trunk/Source/WebCore
- Revision
- 207896
- Author
- [email protected]
- Date
- 2016-10-26 06:24:12 -0700 (Wed, 26 Oct 2016)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (207895 => 207896)
--- trunk/Source/WebCore/ChangeLog 2016-10-26 12:54:46 UTC (rev 207895)
+++ trunk/Source/WebCore/ChangeLog 2016-10-26 13:24:12 UTC (rev 207896)
@@ -1,3 +1,15 @@
+2016-10-26 Andreas Kling <[email protected]>
+
+ 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):
+
2016-10-26 Nael Ouedraogo <[email protected]>
WebRTC: The RTCTrackEventInit dictionary needs required members
Modified: trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm (207895 => 207896)
--- trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm 2016-10-26 12:54:46 UTC (rev 207895)
+++ trunk/Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm 2016-10-26 13:24:12 UTC (rev 207896)
@@ -164,6 +164,8 @@
if (!(threadBasicInfo->flags & TH_FLAGS_IDLE))
usage += threadBasicInfo->cpu_usage / static_cast<float>(TH_USAGE_SCALE) * 100.0;
+
+ mach_port_deallocate(mach_task_self(), threadList[i]);
}
kr = vm_deallocate(mach_task_self(), (vm_offset_t)threadList, threadCount * sizeof(thread_t));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes