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 thtat it doesn't use the old value on re-attach

Auditors: @bridiver
  • Loading branch information
bbondy committed Sep 5, 2017
1 parent 0f94c6f commit 3fccef6
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 @@ -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()

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

0 comments on commit 3fccef6

Please sign in to comment.