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

Unified Diff: content/test/data/remove_frame_on_load.html

Issue 1756483004: Fix use-after-free when navigating a subframe to about:blank. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on Daniel's review. Created 4 years, 10 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
Index: content/test/data/remove_frame_on_load.html
diff --git a/content/test/data/remove_frame_on_load.html b/content/test/data/remove_frame_on_load.html
new file mode 100644
index 0000000000000000000000000000000000000000..8d1785f11c80dd7a094d8144ba5e32c837e935bb
--- /dev/null
+++ b/content/test/data/remove_frame_on_load.html
@@ -0,0 +1,19 @@
+<html>
+ <head>
+ <title>Remove frame on load of about:blank</title>
+ <script>
+ var f;
+ window.addEventListener('load', function() {
+ f = document.querySelector('iframe')
+ f.onload = function() {
+ if (f.contentWindow.location.href == 'about:blank')
+ f.parentNode.removeChild(f);
+ };
+ });
+ </script>
+ </head>
+ <body>
+ <p>Navigate the frame to about:blank page to cause it to be removed.</p>
+ <iframe src="/cross-site/b.com/title2.html"></iframe>
+ </body>
+</html>
« content/browser/site_per_process_browsertest.cc ('K') | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698