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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 , m_inStopAllLoaders(false) | 120 , m_inStopAllLoaders(false) |
121 , m_checkTimer(this, &FrameLoader::checkTimerFired) | 121 , m_checkTimer(this, &FrameLoader::checkTimerFired) |
122 , m_didAccessInitialDocument(false) | 122 , m_didAccessInitialDocument(false) |
123 , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocume
ntTimerFired) | 123 , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocume
ntTimerFired) |
124 , m_forcedSandboxFlags(SandboxNone) | 124 , m_forcedSandboxFlags(SandboxNone) |
125 { | 125 { |
126 } | 126 } |
127 | 127 |
128 FrameLoader::~FrameLoader() | 128 FrameLoader::~FrameLoader() |
129 { | 129 { |
| 130 // Verify that this FrameLoader has been detached. |
| 131 ASSERT(!m_progressTracker); |
130 } | 132 } |
131 | 133 |
132 void FrameLoader::trace(Visitor* visitor) | 134 void FrameLoader::trace(Visitor* visitor) |
133 { | 135 { |
134 visitor->trace(m_frame); | 136 visitor->trace(m_frame); |
| 137 visitor->trace(m_mixedContentChecker); |
| 138 visitor->trace(m_progressTracker); |
135 visitor->trace(m_fetchContext); | 139 visitor->trace(m_fetchContext); |
136 } | 140 } |
137 | 141 |
138 void FrameLoader::init() | 142 void FrameLoader::init() |
139 { | 143 { |
140 ResourceRequest initialRequest(KURL(ParsedURLString, emptyString())); | 144 ResourceRequest initialRequest(KURL(ParsedURLString, emptyString())); |
141 initialRequest.setRequestContext(WebURLRequest::RequestContextInternal); | 145 initialRequest.setRequestContext(WebURLRequest::RequestContextInternal); |
142 initialRequest.setFrameType(m_frame->isMainFrame() ? WebURLRequest::FrameTyp
eTopLevel : WebURLRequest::FrameTypeNested); | 146 initialRequest.setFrameType(m_frame->isMainFrame() ? WebURLRequest::FrameTyp
eTopLevel : WebURLRequest::FrameTypeNested); |
143 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, initia
lRequest, SubstituteData()); | 147 m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, initia
lRequest, SubstituteData()); |
144 m_provisionalDocumentLoader->startLoadingMainResource(); | 148 m_provisionalDocumentLoader->startLoadingMainResource(); |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 detachClient(); | 1137 detachClient(); |
1134 } | 1138 } |
1135 m_frame->detachFromFrameHost(); | 1139 m_frame->detachFromFrameHost(); |
1136 } | 1140 } |
1137 | 1141 |
1138 void FrameLoader::detachClient() | 1142 void FrameLoader::detachClient() |
1139 { | 1143 { |
1140 ASSERT(client()); | 1144 ASSERT(client()); |
1141 | 1145 |
1142 // Finish all cleanup work that might require talking to the embedder. | 1146 // Finish all cleanup work that might require talking to the embedder. |
| 1147 m_progressTracker->dispose(); |
1143 m_progressTracker.clear(); | 1148 m_progressTracker.clear(); |
1144 setOpener(0); | 1149 setOpener(0); |
1145 // Notify ScriptController that the frame is closing, since its cleanup ends
up calling | 1150 // Notify ScriptController that the frame is closing, since its cleanup ends
up calling |
1146 // back to FrameLoaderClient via WindowProxy. | 1151 // back to FrameLoaderClient via WindowProxy. |
1147 m_frame->script().clearForClose(); | 1152 m_frame->script().clearForClose(); |
1148 | 1153 |
1149 // client() should never be null because that means we somehow re-entered | 1154 // client() should never be null because that means we somehow re-entered |
1150 // the frame detach code... but it is sometimes. | 1155 // the frame detach code... but it is sometimes. |
1151 // FIXME: Understand why this is happening so we can document this insanity. | 1156 // FIXME: Understand why this is happening so we can document this insanity. |
1152 if (client()) { | 1157 if (client()) { |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. | 1485 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. |
1481 Frame* parentFrame = m_frame->tree().parent(); | 1486 Frame* parentFrame = m_frame->tree().parent(); |
1482 if (parentFrame && parentFrame->isLocalFrame()) | 1487 if (parentFrame && parentFrame->isLocalFrame()) |
1483 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); | 1488 flags |= toLocalFrame(parentFrame)->document()->sandboxFlags(); |
1484 if (FrameOwner* frameOwner = m_frame->owner()) | 1489 if (FrameOwner* frameOwner = m_frame->owner()) |
1485 flags |= frameOwner->sandboxFlags(); | 1490 flags |= frameOwner->sandboxFlags(); |
1486 return flags; | 1491 return flags; |
1487 } | 1492 } |
1488 | 1493 |
1489 } // namespace blink | 1494 } // namespace blink |
OLD | NEW |