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

Unified Diff: LayoutTests/fast/dom/insertAdjacentHTML-afterend-crash.html

Issue 67813002: Protect contextElement during insertAdjacentHTML call (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments Created 7 years, 1 month 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 | LayoutTests/fast/dom/insertAdjacentHTML-afterend-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/insertAdjacentHTML-afterend-crash.html
diff --git a/LayoutTests/fast/dom/insertAdjacentHTML-afterend-crash.html b/LayoutTests/fast/dom/insertAdjacentHTML-afterend-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..3ecbac2666b47dddf8ed862298765e95db574980
--- /dev/null
+++ b/LayoutTests/fast/dom/insertAdjacentHTML-afterend-crash.html
@@ -0,0 +1,16 @@
+This test passes if it doesn't crash (or ASSERT).
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function free() {
+ document.adoptNode(input);
+ gc();
+}
+
+svg = document.createElementNS('http://www.w3.org/2000/svg','mover');
+input = document.createElement('input');
+svg.appendChild(input);
+svg = null;
+input.insertAdjacentHTML('afterend', '<section onload="free()"></section>');
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/insertAdjacentHTML-afterend-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698