Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void onReceivedHttpError(WebView view, WebResourceRequest request, WebRes
@Override
public boolean onRenderProcessGone(WebView view, RenderProcessGoneDetail detail) {
super.onRenderProcessGone(view, detail);

boolean result = false;

List<WebViewListener> webViewListeners = bridge.getWebViewListeners();
Expand All @@ -106,6 +107,18 @@ public boolean onRenderProcessGone(WebView view, RenderProcessGoneDetail detail)
}
}

if (!result) {
// If no one handled it, handle it ourselves!

view.post(() -> {
Toast.makeText(view.getContext(), "Reloading due to low memory issue", Toast.LENGTH_SHORT).show();
});

view.reload(); // Safely reload WebView

return true;
}

return result;
}
}