⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 232160 in webkit


Ignore:
Timestamp:
May 24, 2018, 12:32:12 PM (8 years ago)
Author:
Brent Fulgham
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r232158 r232160  
     12018-05-24  Brent Fulgham  <bfulgham@apple.com>
     2
     3        REGRESSION(r230269): ASSERTION FAILED: sendRightCount == 1 at ProcessLauncherMac.mm(218)
     4        https://bugs.webkit.org/show_bug.cgi?id=185687
     5        <rdar://problem/39386361>
     6
     7        Reviewed by Brady Eidson.
     8
     9        In r230269 I added an assertion to help identify cases where we were doing bad
     10        bookkeeping in our port send rights. I assumed that because we were adding
     11        one send right, that when we went to close down the connection that we should
     12        have only one send right.
     13       
     14        I have since discovered that this assumption is invalid, and that I should
     15        only be checking that we have AT LEAST ONE send right at the time we attempt
     16        to remove it.
     17
     18        This patch changes the assertion to confirm that we have at least one send
     19        right before we remove the send right.
     20
     21        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
     22        (WebKit::ProcessLauncher::launchProcess):
     23
    1242018-05-24  Chris Dumez  <cdumez@apple.com>
    225
  • trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm

    r231321 r232160  
    216216        mach_port_urefs_t sendRightCount = 0;
    217217        mach_port_get_refs(mach_task_self(), listeningPort, MACH_PORT_RIGHT_SEND, &sendRightCount);
    218         ASSERT(sendRightCount == 1);
     218        ASSERT(sendRightCount >= 1);
    219219#endif
    220220
    … …  
    253253            mach_port_urefs_t sendRightCount = 0;
    254254            mach_port_get_refs(mach_task_self(), listeningPort, MACH_PORT_RIGHT_SEND, &sendRightCount);
    255             ASSERT(sendRightCount == 1);
     255            ASSERT(sendRightCount >= 1);
    256256#endif
    257257
Note: See TracChangeset for help on using the changeset viewer.