DescriptionAndroid: distinguish between crashes and out-of-memory kills in content
The process management logic in the content layer adjusts the renderer
out-of-memory priority allowing the OS to kill inactive renderers when under
memory pressure.
Separately, content layer is also responsible for notyfing the ContentView
clients about death of the renderer process that backs the ContentView, while
the death can be caused either by the out-of-memory kill or an actual process
crash.
It would be useful to notify the clients not only that the process died, but
also about the out-of-memory priority of the process upon its death - otherwise
the clients have to employ heuristics to distinguish between crashes and
out-of-memory kills which inevitably leads to tricky corner-cases.
This patch makes ChildProcessLauncher an authoritative agent that keeps track
of the bindings that raise the renderer process priority in order to protect it
from out-of-memory killing.
ChildProcessConnections use callbacks to notify ChildProcessLauncher each time
a high priority connection is bound or unbound.
Delegating this logic to ChildProcessLauncher allows to escape threading
problems, as ChildProcessConnection might be notified about process
disconnection (and hence closed) before as well as after the content layer
detects a missing renderer and the ContentView client is notified.
BUG=263047
R=joth@chromium.org, yfriedman@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=214366
Patch Set 1 : #
Total comments: 8
Patch Set 2 : Address remarks. #
Total comments: 12
Patch Set 3 : Address further remarks & rebase. #
Total comments: 2
Patch Set 4 : Address onConnected() reentrancy issue, describe interfaces in JavaDoc, rebase. #Patch Set 5 : Rebase. #Patch Set 6 : Amend assert in onRenderProcessSwap(). #
Messages
Total messages: 23 (0 generated)
|