| 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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 unsigned totalNodeCount = InstanceCounters::counterValue(InstanceCounter
s::NodeCounter); | 1108 unsigned totalNodeCount = InstanceCounters::counterValue(InstanceCounter
s::NodeCounter); |
| 1109 float ratio = static_cast<float>(nodeCount) / totalNodeCount; | 1109 float ratio = static_cast<float>(nodeCount) / totalNodeCount; |
| 1110 ThreadState::current()->schedulePageNavigationGCIfNeeded(ratio); | 1110 ThreadState::current()->schedulePageNavigationGCIfNeeded(ratio); |
| 1111 } | 1111 } |
| 1112 | 1112 |
| 1113 // Don't allow any new child frames to load in this frame: attaching a new | 1113 // Don't allow any new child frames to load in this frame: attaching a new |
| 1114 // child frame during or after detaching children results in an attached | 1114 // child frame during or after detaching children results in an attached |
| 1115 // frame on a detached DOM tree, which is bad. | 1115 // frame on a detached DOM tree, which is bad. |
| 1116 SubframeLoadingDisabler disabler(m_frame->document()); | 1116 SubframeLoadingDisabler disabler(m_frame->document()); |
| 1117 if (m_documentLoader) { | 1117 if (m_documentLoader) { |
| 1118 client()->dispatchWillCommitProvisionalLoad(); | 1118 client()->dispatchWillClose(); |
| 1119 dispatchUnloadEvent(); | 1119 dispatchUnloadEvent(); |
| 1120 } | 1120 } |
| 1121 m_frame->detachChildren(); | 1121 m_frame->detachChildren(); |
| 1122 // The previous calls to dispatchUnloadEvent() and detachChildren() can | 1122 // The previous calls to dispatchUnloadEvent() and detachChildren() can |
| 1123 // execute arbitrary script via things like unload events. If the executed | 1123 // execute arbitrary script via things like unload events. If the executed |
| 1124 // script intiates a new load or causes the current frame to be detached, | 1124 // script intiates a new load or causes the current frame to be detached, |
| 1125 // we need to abandon the current load. | 1125 // we need to abandon the current load. |
| 1126 if (pdl != m_provisionalDocumentLoader) | 1126 if (pdl != m_provisionalDocumentLoader) |
| 1127 return false; | 1127 return false; |
| 1128 // detachFromFrame() will abort XHRs that haven't completed, which can | 1128 // detachFromFrame() will abort XHRs that haven't completed, which can |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1674 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1675 return tracedValue; | 1675 return tracedValue; |
| 1676 } | 1676 } |
| 1677 | 1677 |
| 1678 inline void FrameLoader::takeObjectSnapshot() const | 1678 inline void FrameLoader::takeObjectSnapshot() const |
| 1679 { | 1679 { |
| 1680 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1680 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1681 } | 1681 } |
| 1682 | 1682 |
| 1683 } // namespace blink | 1683 } // namespace blink |
| OLD | NEW |