| 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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 dispatchUnloadEvent(); | 1047 dispatchUnloadEvent(); |
| 1048 } | 1048 } |
| 1049 m_frame->detachChildren(); | 1049 m_frame->detachChildren(); |
| 1050 // The previous calls to dispatchUnloadEvent() and detachChildren() can | 1050 // The previous calls to dispatchUnloadEvent() and detachChildren() can |
| 1051 // execute arbitrary script via things like unload events. If the executed | 1051 // execute arbitrary script via things like unload events. If the executed |
| 1052 // script intiates a new load or causes the current frame to be detached, | 1052 // script intiates a new load or causes the current frame to be detached, |
| 1053 // we need to abandon the current load. | 1053 // we need to abandon the current load. |
| 1054 if (pdl != m_provisionalDocumentLoader) | 1054 if (pdl != m_provisionalDocumentLoader) |
| 1055 return false; | 1055 return false; |
| 1056 if (m_documentLoader) { | 1056 if (m_documentLoader) { |
| 1057 FrameNavigationDisabler navigationDisabler(m_frame); | 1057 FrameNavigationDisabler navigationDisabler(*m_frame); |
| 1058 detachDocumentLoader(m_documentLoader); | 1058 detachDocumentLoader(m_documentLoader); |
| 1059 } | 1059 } |
| 1060 // detachFromFrame() will abort XHRs that haven't completed, which can | 1060 // detachFromFrame() will abort XHRs that haven't completed, which can |
| 1061 // trigger event listeners for 'abort'. These event listeners might detach | 1061 // trigger event listeners for 'abort'. These event listeners might detach |
| 1062 // the frame. | 1062 // the frame. |
| 1063 // TODO(dcheng): Investigate if this can be moved above the check that | 1063 // TODO(dcheng): Investigate if this can be moved above the check that |
| 1064 // m_provisionalDocumentLoader hasn't changed. | 1064 // m_provisionalDocumentLoader hasn't changed. |
| 1065 if (!m_frame->client()) | 1065 if (!m_frame->client()) |
| 1066 return false; | 1066 return false; |
| 1067 // No more events will be dispatched so detach the Document. | 1067 // No more events will be dispatched so detach the Document. |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 // FIXME: We need a way to propagate insecure requests policy flags to | 1550 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1551 // out-of-process frames. For now, we'll always use default behavior. | 1551 // out-of-process frames. For now, we'll always use default behavior. |
| 1552 if (!parentFrame->isLocalFrame()) | 1552 if (!parentFrame->isLocalFrame()) |
| 1553 return nullptr; | 1553 return nullptr; |
| 1554 | 1554 |
| 1555 ASSERT(toLocalFrame(parentFrame)->document()); | 1555 ASSERT(toLocalFrame(parentFrame)->document()); |
| 1556 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1556 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
| 1557 } | 1557 } |
| 1558 | 1558 |
| 1559 } // namespace blink | 1559 } // namespace blink |
| OLD | NEW |