• Bo Liu's avatar
    android: Kill child process when out of service slots · 7d1779db
    Bo Liu authored
    Kill the lowest ranked connection when there are no more service slots
    when trying to allocate a new connection.
    
    Remove the hack solution that passed down the number of service slots
    to RenderProcessHost::GetMaxRendererProcessCount.
    Remove releaseAllModerateBindings when the last service is allocated.
    Add a test in content that verifies intentional kill works.
    
    Refactored ChildConnectionAllocator to make the queuing of requests
    explicit. Then add a callback when Allocator runs out of slots for
    allocation which content layer handles by killing the lowest ranked
    connection. This implementation ensures there is only one connection
    being killed waiting to be noticed.
    
    Change-Id: I5f670dfcf6ce645ab2681ec97d095eca98b2b5a2
    Reviewed-on: https://chromium-review.googlesource.com/1002193
    Commit-Queue: Bo <boliu@chromium.org>
    Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
    Reviewed-by: default avatarMaria Khomenko <mariakhomenko@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#556329}
    7d1779db
child_process_launcher.cc 6.21 KB