| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/frame_host/navigation_handle_impl.h" | 5 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 | 8 |
| 9 #include "base/debug/dump_without_crashing.h" | |
| 10 #include "base/logging.h" | 9 #include "base/logging.h" |
| 11 #include "content/browser/appcache/appcache_navigation_handle.h" | 10 #include "content/browser/appcache/appcache_navigation_handle.h" |
| 12 #include "content/browser/appcache/appcache_service_impl.h" | 11 #include "content/browser/appcache/appcache_service_impl.h" |
| 13 #include "content/browser/browsing_data/clear_site_data_throttle.h" | 12 #include "content/browser/browsing_data/clear_site_data_throttle.h" |
| 14 #include "content/browser/child_process_security_policy_impl.h" | 13 #include "content/browser/child_process_security_policy_impl.h" |
| 15 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 14 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 16 #include "content/browser/frame_host/ancestor_throttle.h" | 15 #include "content/browser/frame_host/ancestor_throttle.h" |
| 17 #include "content/browser/frame_host/debug_urls.h" | 16 #include "content/browser/frame_host/debug_urls.h" |
| 18 #include "content/browser/frame_host/frame_tree_node.h" | 17 #include "content/browser/frame_host/frame_tree_node.h" |
| 19 #include "content/browser/frame_host/mixed_content_navigation_throttle.h" | 18 #include "content/browser/frame_host/mixed_content_navigation_throttle.h" |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 // use the RFH determined at the start of the navigation or to switch to | 793 // use the RFH determined at the start of the navigation or to switch to |
| 795 // another one. | 794 // another one. |
| 796 if (IsBrowserSideNavigationEnabled()) | 795 if (IsBrowserSideNavigationEnabled()) |
| 797 return true; | 796 return true; |
| 798 | 797 |
| 799 // A navigation from a RenderFrame that is no longer active should not attempt | 798 // A navigation from a RenderFrame that is no longer active should not attempt |
| 800 // to transfer. | 799 // to transfer. |
| 801 if (!render_frame_host_->is_active()) { | 800 if (!render_frame_host_->is_active()) { |
| 802 // This will cause the deletion of this NavigationHandle and the | 801 // This will cause the deletion of this NavigationHandle and the |
| 803 // cancellation of the navigation. | 802 // cancellation of the navigation. |
| 804 // TODO(clamy): Remove the logging code once we understand better how we can | |
| 805 // get there. | |
| 806 base::debug::DumpWithoutCrashing(); | |
| 807 render_frame_host_->SetNavigationHandle(nullptr); | 803 render_frame_host_->SetNavigationHandle(nullptr); |
| 808 return false; | 804 return false; |
| 809 } | 805 } |
| 810 | 806 |
| 811 // Subframes shouldn't swap processes unless out-of-process iframes are | 807 // Subframes shouldn't swap processes unless out-of-process iframes are |
| 812 // possible. | 808 // possible. |
| 813 if (!IsInMainFrame() && !SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 809 if (!IsInMainFrame() && !SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
| 814 return true; | 810 return true; |
| 815 | 811 |
| 816 // If this is a download, do not do a cross-site check. The renderer will | 812 // If this is a download, do not do a cross-site check. The renderer will |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 if (node->current_url().EqualsIgnoringRef(url_)) { | 925 if (node->current_url().EqualsIgnoringRef(url_)) { |
| 930 if (found_self_reference) | 926 if (found_self_reference) |
| 931 return true; | 927 return true; |
| 932 found_self_reference = true; | 928 found_self_reference = true; |
| 933 } | 929 } |
| 934 } | 930 } |
| 935 return false; | 931 return false; |
| 936 } | 932 } |
| 937 | 933 |
| 938 } // namespace content | 934 } // namespace content |
| OLD | NEW |