From 978544ac10b23906a7a0462f2a3fca705d086a6e Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Tue, 5 Sep 2017 00:49:26 -0400 Subject: [PATCH] Reset guest proxy routing ID So that it doesn't use the old value on re-attach Auditors: @bridiver --- atom/common/api/resources/web_view_api_bindings.js | 2 +- patches/master_patch.patch | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/atom/common/api/resources/web_view_api_bindings.js b/atom/common/api/resources/web_view_api_bindings.js index 91f183af61..a05d1ef991 100644 --- a/atom/common/api/resources/web_view_api_bindings.js +++ b/atom/common/api/resources/web_view_api_bindings.js @@ -74,7 +74,7 @@ const attachWindow = WebViewImpl.prototype.attachWindow$ WebViewImpl.prototype.attachWindow$ = function (opt_guestInstanceId) { if (this.guest.getId() === opt_guestInstanceId && this.guest.getState() === GuestViewImpl.GuestState.GUEST_STATE_ATTACHED) { - return + return true } const guestInstanceId = opt_guestInstanceId || this.guest.getId() diff --git a/patches/master_patch.patch b/patches/master_patch.patch index 86ebfbd49f..d5b70ca706 100644 --- a/patches/master_patch.patch +++ b/patches/master_patch.patch @@ -1590,6 +1590,20 @@ index f6c00f3db4dca275b810a91a42a7e0de81e4254e..f846c6f97362b3d170fcc50c20b579b8 if (delegate_) delegate_->PreSandboxStartup(); +diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc +index 964c9a093a3b0bb07191863e1a0fb3d165046a8e..94316dfe690c367e0b2a7ccce0238b97f93a62d9 100644 +--- a/content/browser/browser_plugin/browser_plugin_guest.cc ++++ b/content/browser/browser_plugin/browser_plugin_guest.cc +@@ -867,6 +867,9 @@ void BrowserPluginGuest::OnDetach(int browser_plugin_instance_id) { + rwhv->UnregisterFrameSinkId(); + + delegate_->DidDetach(); ++ ++ // MUON(bbondy): Make sure GetGuestProxyRoutingID gets new info on re-attach ++ guest_proxy_routing_id_ = MSG_ROUTING_NONE; + } + + void BrowserPluginGuest::OnDragStatusUpdate(int browser_plugin_instance_id, diff --git a/content/browser/frame_host/render_frame_message_filter.cc b/content/browser/frame_host/render_frame_message_filter.cc index 9b9cfbdc53cfdaafcc311d5ee9146536331d600e..69bef89a1a6bcf6fece54463b2efd973a1ce7c46 100644 --- a/content/browser/frame_host/render_frame_message_filter.cc