OOPIF-ize hung renderers

https://chromium-review.googlesource.com/c/chromium/src/+/896343
This commit is contained in:
deepak1556 2018-04-11 20:53:16 +05:30 committed by Samuel Attard
parent 2047929cb5
commit 100291ec42
4 changed files with 10 additions and 6 deletions

View file

@ -155,7 +155,7 @@ void BrowserWindow::BeforeUnloadDialogCancelled() {
window_unresponsive_closure_.Cancel();
}
void BrowserWindow::OnRendererUnresponsive(content::RenderWidgetHost*) {
void BrowserWindow::OnRendererUnresponsive(content::RenderProcessHost*) {
// Schedule the unresponsive shortly later, since we may receive the
// responsive event soon. This could happen after the whole application had
// blocked for a while.

View file

@ -49,7 +49,7 @@ class BrowserWindow : public TopLevelWindow,
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
void DidFirstVisuallyNonEmptyPaint() override;
void BeforeUnloadDialogCancelled() override;
void OnRendererUnresponsive(content::RenderWidgetHost*) override;
void OnRendererUnresponsive(content::RenderProcessHost*) override;
bool OnMessageReceived(const IPC::Message& message,
content::RenderFrameHost* rfh) override;

View file

@ -699,11 +699,13 @@ void WebContents::ExitFullscreenModeForTab(content::WebContents* source) {
void WebContents::RendererUnresponsive(
content::WebContents* source,
const content::WebContentsUnresponsiveState& unresponsive_state) {
content::RenderWidgetHost* render_widget_host) {
Emit("unresponsive");
}
void WebContents::RendererResponsive(content::WebContents* source) {
void WebContents::RendererResponsive(
content::WebContents* source,
content::RenderWidgetHost* render_widget_host) {
Emit("responsive");
for (ExtendedWebContentsObserver& observer : observers_)
observer.OnRendererResponsive();

View file

@ -310,8 +310,10 @@ class WebContents : public mate::TrackableObject<WebContents>,
void ExitFullscreenModeForTab(content::WebContents* source) override;
void RendererUnresponsive(
content::WebContents* source,
const content::WebContentsUnresponsiveState& unresponsive_state) override;
void RendererResponsive(content::WebContents* source) override;
content::RenderWidgetHost* render_widget_host) override;
void RendererResponsive(
content::WebContents* source,
content::RenderWidgetHost* render_widget_host) override;
bool HandleContextMenu(const content::ContextMenuParams& params) override;
bool OnGoToEntryOffset(int offset) override;
void FindReply(content::WebContents* web_contents,