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

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

Issue 2428803002: Don't send loading completion callbacks for detaching frames. (Closed)
Patch Set: Remove stray include Created 4 years 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 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 return false; 680 return false;
681 681
682 // We might have declined to run the load event due to an imminent 682 // We might have declined to run the load event due to an imminent
683 // content-initiated navigation. 683 // content-initiated navigation.
684 if (!frame->document()->loadEventFinished()) 684 if (!frame->document()->loadEventFinished())
685 return false; 685 return false;
686 686
687 // An event might have restarted a child frame. 687 // An event might have restarted a child frame.
688 if (!allDescendantsAreComplete(frame)) 688 if (!allDescendantsAreComplete(frame))
689 return false; 689 return false;
690
691 // Don't notify if the frame is being detached.
692 if (frame->isDetaching())
693 return false;
694
690 return true; 695 return true;
691 } 696 }
692 697
693 static bool shouldSendCompleteNotification(LocalFrame* frame, 698 static bool shouldSendCompleteNotification(LocalFrame* frame,
694 bool isNavigationHandledByClient) { 699 bool isNavigationHandledByClient) {
695 // FIXME: We might have already sent stop notifications and be re-completing. 700 // FIXME: We might have already sent stop notifications and be re-completing.
696 if (!frame->isLoading()) 701 if (!frame->isLoading())
697 return false; 702 return false;
698 // Only send didStopLoading() if there are no navigations in progress at all, 703 // Only send didStopLoading() if there are no navigations in progress at all,
699 // whether committed, provisional, or pending. 704 // whether committed, provisional, or pending.
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 m_documentLoader ? m_documentLoader->url() : String()); 1957 m_documentLoader ? m_documentLoader->url() : String());
1953 return tracedValue; 1958 return tracedValue;
1954 } 1959 }
1955 1960
1956 inline void FrameLoader::takeObjectSnapshot() const { 1961 inline void FrameLoader::takeObjectSnapshot() const {
1957 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, 1962 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this,
1958 toTracedValue()); 1963 toTracedValue());
1959 } 1964 }
1960 1965
1961 } // namespace blink 1966 } // namespace blink
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/password_autofill_agent.cc ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698