2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:49:13 -0700
|
|
|
|
Subject: webview_reattach.patch
|
|
|
|
|
|
|
|
Backports https://chromium-review.googlesource.com/c/chromium/src/+/1161391
|
|
|
|
Fixes webview not working after renderer process restarted.
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
2018-11-05 14:29:33 +00:00
|
|
|
index 64ad6ca91d9331a09d09f7e29b7c24a0c12852a2..ec3d1ccbad7e3e4184205f87b6b3fb7dcd4c07f2 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/content/browser/web_contents/web_contents_impl.cc
|
|
|
|
+++ b/content/browser/web_contents/web_contents_impl.cc
|
2018-11-05 14:29:33 +00:00
|
|
|
@@ -4886,6 +4886,12 @@ void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host,
|
2018-09-21 00:30:26 +00:00
|
|
|
|
|
|
|
view_->RenderViewHostChanged(old_host, new_host);
|
2018-09-14 05:02:16 +00:00
|
|
|
|
|
|
|
+ // If this is an inner WebContents that has swapped views, we need to reattach
|
|
|
|
+ // it to its outer WebContents.
|
|
|
|
+ if (node_.outer_web_contents())
|
|
|
|
+ ReattachToOuterWebContentsFrame();
|
2018-09-21 00:30:26 +00:00
|
|
|
+
|
2018-09-14 05:02:16 +00:00
|
|
|
+
|
|
|
|
// Ensure that the associated embedder gets cleared after a RenderViewHost
|
|
|
|
// gets swapped, so we don't reuse the same embedder next time a
|
|
|
|
// RenderViewHost is attached to this WebContents.
|