Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 1949163002: SendPageMessage() should not send to a WebView guest's embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 58c17d54c34798e0e070878e4e572a594f41a3a3..f8472e4093d6195a97ad97830d07bb4143d48816 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -2503,8 +2503,13 @@ void RenderFrameHostManager::SendPageMessage(IPC::Message* msg) {
sender->Send(copy);
};
- for (const auto& pair : proxy_hosts_)
- send_msg(pair.second.get(), pair.second->GetRoutingID(), msg);
+ // When sending a PageMessage to a WebView's guest, we don't want to also
nasko 2016/05/04 21:58:59 nit: WebView is overloaded term, let's avoid using
wjmaclean 2016/05/05 15:40:56 Done.
+ // send it to the embedder's frames as well. A WebView guest frame tree should
+ // have no proxies other than for its embedder.
+ if (!ForInnerDelegate()) {
nasko 2016/05/04 21:58:59 This will not be true if we allow cross-process na
wjmaclean 2016/05/05 15:40:56 I'm not sure I understand this. What if some sub-f
+ for (const auto& pair : proxy_hosts_)
+ send_msg(pair.second.get(), pair.second->GetRoutingID(), msg);
+ }
if (speculative_render_frame_host_) {
send_msg(speculative_render_frame_host_.get(),

Powered by Google App Engine
This is Rietveld 408576698