Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Reset guest proxy routing ID
Browse files Browse the repository at this point in the history
So that it doesn't use the old value on re-attach

Auditors: @bridiver
  • Loading branch information
bbondy committed Sep 5, 2017
1 parent 602f560 commit 978544a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion atom/common/api/resources/web_view_api_bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
14 changes: 14 additions & 0 deletions patches/master_patch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 978544a

Please sign in to comment.