Chromium Code Reviews| Index: content/browser/tab_contents/tab_contents.cc |
| diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc |
| index 9a763e9a85b67e6b0c41c754b37ee8ea1bcd56d7..db8b013be69812d552ed7aa3b831931ad6153fcb 100644 |
| --- a/content/browser/tab_contents/tab_contents.cc |
| +++ b/content/browser/tab_contents/tab_contents.cc |
| @@ -575,7 +575,7 @@ bool TabContents::NavigateToPendingEntry( |
| } |
| bool TabContents::NavigateToEntry( |
| - const NavigationEntry& entry, |
| + NavigationEntry& entry, |
|
jam
2011/11/01 19:14:33
this is against the google style guide, so you wil
Charlie Reis
2011/11/01 19:16:27
Will do.
Charlie Reis
2011/11/01 19:25:45
Done.
|
| NavigationController::ReloadType reload_type) { |
| // The renderer will reject IPC messages with URLs longer than |
| // this limit, so don't attempt to navigate with a longer URL. |
| @@ -586,6 +586,13 @@ bool TabContents::NavigateToEntry( |
| if (!dest_render_view_host) |
| return false; // Unable to create the desired render view host. |
| + // If we were forced to swap the entry's existing SiteInstance, we need to |
| + // update it before the navigation begins so that we can find it when the |
| + // navigation commits. |
| + if (entry.site_instance() && |
| + entry.site_instance() != dest_render_view_host->site_instance()) |
| + entry.set_site_instance(dest_render_view_host->site_instance()); |
| + |
| // For security, we should never send non-Web-UI URLs to a Web UI renderer. |
| // Double check that here. |
| int enabled_bindings = dest_render_view_host->enabled_bindings(); |