OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 if (pdl != m_provisionalDocumentLoader) | 976 if (pdl != m_provisionalDocumentLoader) |
977 return; | 977 return; |
978 if (m_documentLoader) | 978 if (m_documentLoader) |
979 m_documentLoader->detachFromFrame(); | 979 m_documentLoader->detachFromFrame(); |
980 m_documentLoader = m_provisionalDocumentLoader.release(); | 980 m_documentLoader = m_provisionalDocumentLoader.release(); |
981 if (m_frame->document()) { | 981 if (m_frame->document()) { |
982 // Note that calling detachChildren() shouldn't be needed if there's no | 982 // Note that calling detachChildren() shouldn't be needed if there's no |
983 // Document, since no child frames should be attached. The assert below | 983 // Document, since no child frames should be attached. The assert below |
984 // enforces this invariant. | 984 // enforces this invariant. |
985 m_frame->detachChildren(); | 985 m_frame->detachChildren(); |
| 986 // If detachChildren() detaches this frame, abandon the current load. |
| 987 if (!client()) |
| 988 return; |
986 m_frame->document()->detach(); | 989 m_frame->document()->detach(); |
987 } | 990 } |
988 ASSERT(m_frame->tree().childCount() == 0); | 991 ASSERT(m_frame->tree().childCount() == 0); |
989 | 992 |
990 if (isLoadingMainFrame()) | 993 if (isLoadingMainFrame()) |
991 m_frame->page()->chrome().client().needTouchEvents(false); | 994 m_frame->page()->chrome().client().needTouchEvents(false); |
992 | 995 |
993 client()->transitionToCommittedForNewPage(); | 996 client()->transitionToCommittedForNewPage(); |
994 m_frame->navigationScheduler().cancel(); | 997 m_frame->navigationScheduler().cancel(); |
995 m_frame->editor().clearLastEditCommand(); | 998 m_frame->editor().clearLastEditCommand(); |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 // FIXME: We need a way to propagate insecure requests policy flags to | 1454 // FIXME: We need a way to propagate insecure requests policy flags to |
1452 // out-of-process frames. For now, we'll always use default behavior. | 1455 // out-of-process frames. For now, we'll always use default behavior. |
1453 if (!parentFrame->isLocalFrame()) | 1456 if (!parentFrame->isLocalFrame()) |
1454 return nullptr; | 1457 return nullptr; |
1455 | 1458 |
1456 ASSERT(toLocalFrame(parentFrame)->document()); | 1459 ASSERT(toLocalFrame(parentFrame)->document()); |
1457 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1460 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1458 } | 1461 } |
1459 | 1462 |
1460 } // namespace blink | 1463 } // namespace blink |
OLD | NEW |