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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10827078: Support frame tree propagation between renderers in the same browsing instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved away from hardcoded strings and no static cast needed for tests. Created 8 years, 4 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 61d98d8faab7f8eaa2baecf2311112c8b073bb36..4d0e484001f91c67f815e4d3ec7e614ea571be6a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2746,6 +2746,10 @@ void WebContentsImpl::DidChangeLoadProgress(double progress) {
delegate_->LoadProgressChanged(this, progress);
}
+void WebContentsImpl::DidUpdateFrameTree(RenderViewHost* rvh) {
+ render_manager_.DidUpdateFrameTree(rvh);
+}
+
void WebContentsImpl::DocumentAvailableInMainFrame(
RenderViewHost* render_view_host) {
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
@@ -2839,6 +2843,15 @@ void WebContentsImpl::RouteMessageEvent(
return;
ViewMsg_PostMessage_Params new_params(params);
+ RenderViewHost* active_rvh = GetRenderViewHost();
+
+ if (active_rvh->GetProcess()->GetID() != params.target_process_id) {
+ LOG(ERROR) << "Possibly race condition trying to deliver to " <<
+ params.target_process_id << ", which doesn't match " <<
+ active_rvh->GetProcess()->GetID();
awong 2012/08/21 19:27:28 This log isn't going to be seen by anyone. If we n
Charlie Reis 2012/08/22 22:08:34 Yeah, I had a similar comment in patch set 10.
+ return;
+ }
+ DCHECK(params.target_frame_id != 0);
awong 2012/08/21 19:27:28 If it is 0, what happens below?
nasko 2012/08/21 22:24:13 0 is an invalid frame ID, so the call won't succee
// If there is a source_routing_id, translate it to the routing ID for
// the equivalent swapped out RVH in the target process. If we need

Powered by Google App Engine
This is Rietveld 408576698