summaryrefslogtreecommitdiffstats
path: root/android_webview/java
diff options
context:
space:
mode:
authorppi@chromium.org <ppi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 16:49:57 +0000
committerppi@chromium.org <ppi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 16:49:57 +0000
commit96f49a40e7e15340de2f6a585a376b4ad28c2a69 (patch)
tree3d163119c0f9e8f3dcb4a15c5b14c53a78ed444d /android_webview/java
parent463e01f4d6caee7f62f2c220a6b4816f73bc0999 (diff)
downloadchromium_src-96f49a40e7e15340de2f6a585a376b4ad28c2a69.zip
chromium_src-96f49a40e7e15340de2f6a585a376b4ad28c2a69.tar.gz
chromium_src-96f49a40e7e15340de2f6a585a376b4ad28c2a69.tar.bz2
Android: 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 Review URL: https://codereview.chromium.org/19969003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/java')
-rw-r--r--android_webview/java/src/org/chromium/android_webview/AwContentsClient.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
index fe42ad3..f1c7f45 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
@@ -116,7 +116,7 @@ public abstract class AwContentsClient {
}
@Override
- public void onTabCrash() {
+ public void onRendererCrash(boolean crashedWhileOomProtected) {
// This is not possible so long as the webview is run single process!
throw new RuntimeException("Renderer crash reported.");
}