Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2389493002: Revert of Require WebLocalFrame to be created with a non-null client (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.h ('k') | third_party/WebKit/Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698