Chromium Code Reviews
Description[HttpNetworkSession] Flush socket pools on low memory notification.
This cl aims to reduce the number of times chrome is killed
when there is not enough memory left (it mostly concerns
Android).
When there is a low memory notification sent by the memory
pressure monitor (either MEMORY_PRESSURE_LEVEL_MODERATE or
MEMORY_PRESSURE_LEVEL_CRITICAL), OnMemoryPressure callback
is called and idle sockets are flushed.
At first I thought to close idle sockets on moderate
notifications and use CloseAllConnections() on critical
notifications, but after some tests decided to flush idle
sockets only, because CloseAllConnections() terminates a
transaction and causes failure.
+ added unit tests.
BUG=617719
Committed: https://crrev.com/0adf859e4a1312c56d324503a59959fd85dc8c44
Cr-Commit-Position: refs/heads/master@{#405708}
Patch Set 1 #Patch Set 2 : returned accidently removed code. #
Total comments: 8
Patch Set 3 : mmenke's comments and rebasing #
Messages
Total messages: 19 (11 generated)
|
|||||||||||||||||||||||||||||||||||||