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

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 1116763002: Gracefully handle unruly children detaching our frame and client. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/frames/detach-frame-nested-on-commit-no-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 5d17ba671aa3458daf719ad25a587e7f1377e09b..4044537b0b04a26af9b6d6126537356aed142457 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -983,6 +983,9 @@ void FrameLoader::commitProvisionalLoad()
// Document, since no child frames should be attached. The assert below
// enforces this invariant.
m_frame->detachChildren();
+ // If detachChildren() detaches this frame, abandon the current load.
+ if (!client())
+ return;
m_frame->document()->detach();
}
ASSERT(m_frame->tree().childCount() == 0);
« no previous file with comments | « LayoutTests/fast/frames/detach-frame-nested-on-commit-no-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698