Title: [232160] trunk/Source/WebKit
Revision
232160
Author
[email protected]
Date
2018-05-24 12:32:12 -0700 (Thu, 24 May 2018)

Log Message

REGRESSION(r230269): ASSERTION FAILED: sendRightCount == 1 at ProcessLauncherMac.mm(218)
https://bugs.webkit.org/show_bug.cgi?id=185687
<rdar://problem/39386361>

Reviewed by Brady Eidson.

In r230269 I added an assertion to help identify cases where we were doing bad
bookkeeping in our port send rights. I assumed that because we were adding
one send right, that when we went to close down the connection that we should
have only one send right.

I have since discovered that this assumption is invalid, and that I should
only be checking that we have AT LEAST ONE send right at the time we attempt
to remove it.

This patch changes the assertion to confirm that we have at least one send
right before we remove the send right.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (232159 => 232160)


--- trunk/Source/WebKit/ChangeLog	2018-05-24 19:23:15 UTC (rev 232159)
+++ trunk/Source/WebKit/ChangeLog	2018-05-24 19:32:12 UTC (rev 232160)
@@ -1,3 +1,26 @@
+2018-05-24  Brent Fulgham  <[email protected]>
+
+        REGRESSION(r230269): ASSERTION FAILED: sendRightCount == 1 at ProcessLauncherMac.mm(218)
+        https://bugs.webkit.org/show_bug.cgi?id=185687
+        <rdar://problem/39386361>
+
+        Reviewed by Brady Eidson.
+
+        In r230269 I added an assertion to help identify cases where we were doing bad
+        bookkeeping in our port send rights. I assumed that because we were adding
+        one send right, that when we went to close down the connection that we should
+        have only one send right.
+        
+        I have since discovered that this assumption is invalid, and that I should
+        only be checking that we have AT LEAST ONE send right at the time we attempt
+        to remove it.
+
+        This patch changes the assertion to confirm that we have at least one send
+        right before we remove the send right.
+
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::ProcessLauncher::launchProcess):
+
 2018-05-24  Chris Dumez  <[email protected]>
 
         Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds

Modified: trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm (232159 => 232160)


--- trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2018-05-24 19:23:15 UTC (rev 232159)
+++ trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2018-05-24 19:32:12 UTC (rev 232160)
@@ -215,7 +215,7 @@
 #ifndef _NDEBUG
         mach_port_urefs_t sendRightCount = 0;
         mach_port_get_refs(mach_task_self(), listeningPort, MACH_PORT_RIGHT_SEND, &sendRightCount);
-        ASSERT(sendRightCount == 1);
+        ASSERT(sendRightCount >= 1);
 #endif
 
         // We failed to launch. Release the send right.
@@ -252,7 +252,7 @@
 #ifndef _NDEBUG
             mach_port_urefs_t sendRightCount = 0;
             mach_port_get_refs(mach_task_self(), listeningPort, MACH_PORT_RIGHT_SEND, &sendRightCount);
-            ASSERT(sendRightCount == 1);
+            ASSERT(sendRightCount >= 1);
 #endif
 
             deallocateSendRightSafely(listeningPort);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to