Title: [218842] trunk/Source/WebKit2
Revision
218842
Author
[email protected]
Date
2017-06-27 14:23:22 -0700 (Tue, 27 Jun 2017)

Log Message

ProcessLauncherMac could leak a xpc connection when the process had failed to launch
https://bugs.webkit.org/show_bug.cgi?id=173865

Reviewed by Antti Koivisto.

Explicitly cancel the XPC connection even When the process launch had failed to avoid a leak.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (218841 => 218842)


--- trunk/Source/WebKit2/ChangeLog	2017-06-27 21:10:24 UTC (rev 218841)
+++ trunk/Source/WebKit2/ChangeLog	2017-06-27 21:23:22 UTC (rev 218842)
@@ -1,3 +1,15 @@
+2017-06-27  Ryosuke Niwa  <[email protected]>
+
+        ProcessLauncherMac could leak a xpc connection when the process had failed to launch
+        https://bugs.webkit.org/show_bug.cgi?id=173865
+
+        Reviewed by Antti Koivisto.
+
+        Explicitly cancel the XPC connection even When the process launch had failed to avoid a leak.
+
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::ProcessLauncher::launchProcess):
+
 2017-06-27  John Wilander  <[email protected]>
 
         Resource Load Statistics: Add telemetry

Modified: trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm (218841 => 218842)


--- trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2017-06-27 21:10:24 UTC (rev 218841)
+++ trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2017-06-27 21:23:22 UTC (rev 218842)
@@ -201,6 +201,7 @@
         // And the receive right.
         mach_port_mod_refs(mach_task_self(), listeningPort, MACH_PORT_RIGHT_RECEIVE, -1);
 
+        xpc_connection_cancel(processLauncher->m_xpcConnection.get());
         processLauncher->m_xpcConnection = nullptr;
 
         processLauncher->didFinishLaunchingProcess(0, IPC::Connection::Identifier());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to