| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "content/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" | 
| 6 | 6 | 
| 7 #include <set> | 7 #include <set> | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 285   // initialized it) or may not (we have our own process or the old process | 285   // initialized it) or may not (we have our own process or the old process | 
| 286   // crashed) have been initialized. Calling Init multiple times will be | 286   // crashed) have been initialized. Calling Init multiple times will be | 
| 287   // ignored, so this is safe. | 287   // ignored, so this is safe. | 
| 288   if (!GetProcess()->Init()) | 288   if (!GetProcess()->Init()) | 
| 289     return false; | 289     return false; | 
| 290   DCHECK(GetProcess()->HasConnection()); | 290   DCHECK(GetProcess()->HasConnection()); | 
| 291   DCHECK(GetProcess()->GetBrowserContext()); | 291   DCHECK(GetProcess()->GetBrowserContext()); | 
| 292   CHECK(main_frame_routing_id_ != MSG_ROUTING_NONE || | 292   CHECK(main_frame_routing_id_ != MSG_ROUTING_NONE || | 
| 293         proxy_route_id != MSG_ROUTING_NONE); | 293         proxy_route_id != MSG_ROUTING_NONE); | 
| 294 | 294 | 
| 295   // If swappedout:// is disabled, we should not set both main_frame_routing_id_ | 295   // We should not set both main_frame_routing_id_ and proxy_route_id.  Log | 
| 296   // and proxy_route_id.  Log cases that this happens (without crashing) to | 296   // cases that this happens (without crashing) to track down | 
| 297   // track down https://crbug.com/574245. | 297   // https://crbug.com/574245. | 
| 298   // TODO(creis): Remove this once we've found the cause. | 298   // TODO(creis): Remove this once we've found the cause. | 
| 299   if (SiteIsolationPolicy::IsSwappedOutStateForbidden() && | 299   if (main_frame_routing_id_ != MSG_ROUTING_NONE && | 
| 300       main_frame_routing_id_ != MSG_ROUTING_NONE && |  | 
| 301       proxy_route_id != MSG_ROUTING_NONE) | 300       proxy_route_id != MSG_ROUTING_NONE) | 
| 302     base::debug::DumpWithoutCrashing(); | 301     base::debug::DumpWithoutCrashing(); | 
| 303 | 302 | 
| 304   GetWidget()->set_renderer_initialized(true); | 303   GetWidget()->set_renderer_initialized(true); | 
| 305 | 304 | 
| 306   // Ensure the RenderView starts with a next_page_id larger than any existing | 305   // Ensure the RenderView starts with a next_page_id larger than any existing | 
| 307   // page ID it might be asked to render. | 306   // page ID it might be asked to render. | 
| 308   int32_t next_page_id = 1; | 307   int32_t next_page_id = 1; | 
| 309   if (max_page_id > -1) | 308   if (max_page_id > -1) | 
| 310     next_page_id = max_page_id + 1; | 309     next_page_id = max_page_id + 1; | 
| (...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1354   } else { | 1353   } else { | 
| 1355     render_view_ready_on_process_launch_ = true; | 1354     render_view_ready_on_process_launch_ = true; | 
| 1356   } | 1355   } | 
| 1357 } | 1356 } | 
| 1358 | 1357 | 
| 1359 void RenderViewHostImpl::RenderViewReady() { | 1358 void RenderViewHostImpl::RenderViewReady() { | 
| 1360   delegate_->RenderViewReady(this); | 1359   delegate_->RenderViewReady(this); | 
| 1361 } | 1360 } | 
| 1362 | 1361 | 
| 1363 }  // namespace content | 1362 }  // namespace content | 
| OLD | NEW | 
|---|