| 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/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 4596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4607 // The SiteInstance might not match if we do a cross-process navigation with | 4607 // The SiteInstance might not match if we do a cross-process navigation with |
| 4608 // replacement (e.g., auto-subframe), in which case the swap out of the old | 4608 // replacement (e.g., auto-subframe), in which case the swap out of the old |
| 4609 // RenderFrameHost runs in the background after the old FrameNavigationEntry | 4609 // RenderFrameHost runs in the background after the old FrameNavigationEntry |
| 4610 // has already been replaced and destroyed. | 4610 // has already been replaced and destroyed. |
| 4611 if (frame_entry->site_instance() != rfhi->GetSiteInstance()) | 4611 if (frame_entry->site_instance() != rfhi->GetSiteInstance()) |
| 4612 return; | 4612 return; |
| 4613 | 4613 |
| 4614 if (page_state == frame_entry->page_state()) | 4614 if (page_state == frame_entry->page_state()) |
| 4615 return; // Nothing to update. | 4615 return; // Nothing to update. |
| 4616 | 4616 |
| 4617 if (!page_state.IsValid()) { | 4617 DCHECK(page_state.IsValid()) << "Shouldn't set an empty PageState."; |
| 4618 // Temporarily generate a minidump to diagnose https://crbug.com/568703. | |
| 4619 base::debug::DumpWithoutCrashing(); | |
| 4620 NOTREACHED() << "Shouldn't set an empty PageState."; | |
| 4621 } | |
| 4622 | 4618 |
| 4623 // The document_sequence_number and item_sequence_number recorded in the | 4619 // The document_sequence_number and item_sequence_number recorded in the |
| 4624 // FrameNavigationEntry should not differ from the one coming with the update, | 4620 // FrameNavigationEntry should not differ from the one coming with the update, |
| 4625 // since it must come from the same document. Do not update it if a difference | 4621 // since it must come from the same document. Do not update it if a difference |
| 4626 // is detected, as this indicates that |frame_entry| is not the correct one. | 4622 // is detected, as this indicates that |frame_entry| is not the correct one. |
| 4627 ExplodedPageState exploded_state; | 4623 ExplodedPageState exploded_state; |
| 4628 if (!DecodePageState(page_state.ToEncodedData(), &exploded_state)) | 4624 if (!DecodePageState(page_state.ToEncodedData(), &exploded_state)) |
| 4629 return; | 4625 return; |
| 4630 | 4626 |
| 4631 if (exploded_state.top.document_sequence_number != | 4627 if (exploded_state.top.document_sequence_number != |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5443 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5439 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
| 5444 if (!render_view_host) | 5440 if (!render_view_host) |
| 5445 continue; | 5441 continue; |
| 5446 render_view_host_set.insert(render_view_host); | 5442 render_view_host_set.insert(render_view_host); |
| 5447 } | 5443 } |
| 5448 for (RenderViewHost* render_view_host : render_view_host_set) | 5444 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5449 render_view_host->OnWebkitPreferencesChanged(); | 5445 render_view_host->OnWebkitPreferencesChanged(); |
| 5450 } | 5446 } |
| 5451 | 5447 |
| 5452 } // namespace content | 5448 } // namespace content |
| OLD | NEW |