From 3fccef69ca982b97f39fb2f4bdec5e1843af6687 Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Mon, 4 Sep 2017 23:52:49 -0400 Subject: [PATCH] Reset guest proxy routing ID So thtat 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 4a612c7ded..7d32e2a00d 100644 --- a/atom/common/api/resources/web_view_api_bindings.js +++ b/atom/common/api/resources/web_view_api_bindings.js @@ -98,7 +98,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 6ae0c16660..ac00ee8513 100644 --- a/patches/master_patch.patch +++ b/patches/master_patch.patch @@ -1504,6 +1504,20 @@ index a677c9d2c6df30e78614b09d396372db33dff781..47edb643c0507958134edb146ac1b564 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 e05acc6ca6dcbf2eb0da6ee50dccbb094ed64a22..a62b8e3b221bb0560992f17a4425d7c7fd84991f 100644 +--- a/content/browser/browser_plugin/browser_plugin_guest.cc ++++ b/content/browser/browser_plugin/browser_plugin_guest.cc +@@ -857,6 +857,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 bbbb37d8917d3987d9ea3514d9cac343dde8faeb..e3200b24a050d1f957896bb77ecf7afe38692ac4 100644 --- a/content/browser/frame_host/render_frame_message_filter.cc