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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script> 1 <script>
2 onunload = function() { 2 onunload = function() {
3 // disable page cache 3 // disable page cache
4 } 4 }
5 5
6 var pageLoaded = false;
7
6 onpopstate = function() { 8 onpopstate = function() {
9 // The first time popstate fires, it's because the page has finished loading.
10 if (!pageLoaded) {
11 pageLoaded = true;
12 return;
13 }
14
7 var topWin = top; 15 var topWin = top;
8 // Verify that we are still in an iframe 16 // Verify that we are still in an iframe
9 if (topWin == window) { 17 if (topWin == window) {
10 topWin.document.body.innerHTML = "FAIL"; 18 topWin.document.body.innerHTML = "FAIL";
11 } else { 19 } else {
12 topWin.document.body.innerHTML = "PASS"; 20 topWin.document.body.innerHTML = "PASS";
13 } 21 }
14 if (topWin.testRunner) 22 if (topWin.testRunner)
15 topWin.testRunner.notifyDone(); 23 topWin.testRunner.notifyDone();
16 } 24 }
17 25
18 onload = function() { 26 onload = function() {
19 history.pushState(null, null); 27 history.pushState(null, null);
20 history.pushState(null, null); 28 history.pushState(null, null);
21 setTimeout(function() { history.back() }, 0); 29 setTimeout(function() { history.back() }, 0);
22 } 30 }
23 </script> 31 </script>
OLDNEW
« 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