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

Unified Diff: LayoutTests/fast/loader/stateobjects/resources/pushstate-in-iframe-child.html

Issue 138213002: Fix crash when popstate handler detaches frame during history navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/loader/stateobjects/resources/pushstate-in-iframe-child.html
diff --git a/LayoutTests/fast/loader/stateobjects/resources/pushstate-in-iframe-child.html b/LayoutTests/fast/loader/stateobjects/resources/pushstate-in-iframe-child.html
index 517ed73b0289c61cd041c632fe54d7cff2b8812a..b5c68129304632ab4740cf09e7f026f66280db29 100644
--- a/LayoutTests/fast/loader/stateobjects/resources/pushstate-in-iframe-child.html
+++ b/LayoutTests/fast/loader/stateobjects/resources/pushstate-in-iframe-child.html
@@ -3,7 +3,15 @@ onunload = function() {
// disable page cache
}
+var pageLoaded = false;
+
onpopstate = function() {
+ // The first time popstate fires, it's because the page has finished loading.
+ if (!pageLoaded) {
+ pageLoaded = true;
+ return;
+ }
+
var topWin = top;
// Verify that we are still in an iframe
if (topWin == window) {
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698