| 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 client()->dispatchWillClose(); | 971 client()->dispatchWillClose(); |
| 972 dispatchUnloadEvent(); | 972 dispatchUnloadEvent(); |
| 973 } | 973 } |
| 974 m_frame->detachChildren(); | 974 m_frame->detachChildren(); |
| 975 // The previous calls to dispatchUnloadEvent() and detachChildren() can | 975 // The previous calls to dispatchUnloadEvent() and detachChildren() can |
| 976 // execute arbitrary script via things like unload events. If the executed | 976 // execute arbitrary script via things like unload events. If the executed |
| 977 // script intiates a new load or causes the current frame to be detached, | 977 // script intiates a new load or causes the current frame to be detached, |
| 978 // we need to abandon the current load. | 978 // we need to abandon the current load. |
| 979 if (pdl != m_provisionalDocumentLoader) | 979 if (pdl != m_provisionalDocumentLoader) |
| 980 return; | 980 return; |
| 981 if (m_documentLoader) | 981 if (m_documentLoader) { |
| 982 FrameNavigationDisabler navigationDisabler(m_frame); |
| 982 m_documentLoader->detachFromFrame(); | 983 m_documentLoader->detachFromFrame(); |
| 984 } |
| 983 // detachFromFrame() will abort XHRs that haven't completed, which can | 985 // detachFromFrame() will abort XHRs that haven't completed, which can |
| 984 // trigger event listeners for 'abort'. These event listeners might detach | 986 // trigger event listeners for 'abort'. These event listeners might detach |
| 985 // the frame. | 987 // the frame. |
| 986 // TODO(dcheng): Investigate if this can be moved above the check that | 988 // TODO(dcheng): Investigate if this can be moved above the check that |
| 987 // m_provisionalDocumentLoader hasn't changed. | 989 // m_provisionalDocumentLoader hasn't changed. |
| 988 if (!m_frame->client()) | 990 if (!m_frame->client()) |
| 989 return; | 991 return; |
| 990 // No more events will be dispatched so detach the Document. | 992 // No more events will be dispatched so detach the Document. |
| 991 if (m_frame->document()) | 993 if (m_frame->document()) |
| 992 m_frame->document()->detach(); | 994 m_frame->document()->detach(); |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 // FIXME: We need a way to propagate insecure requests policy flags to | 1447 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1446 // out-of-process frames. For now, we'll always use default behavior. | 1448 // out-of-process frames. For now, we'll always use default behavior. |
| 1447 if (!parentFrame->isLocalFrame()) | 1449 if (!parentFrame->isLocalFrame()) |
| 1448 return nullptr; | 1450 return nullptr; |
| 1449 | 1451 |
| 1450 ASSERT(toLocalFrame(parentFrame)->document()); | 1452 ASSERT(toLocalFrame(parentFrame)->document()); |
| 1451 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1453 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
| 1452 } | 1454 } |
| 1453 | 1455 |
| 1454 } // namespace blink | 1456 } // namespace blink |
| OLD | NEW |