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

Unified Diff: LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash.html

Issue 19303002: Fix crash due to unexpected Node deletion during MutationObserver registration book-keeping (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash.html
diff --git a/LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash.html b/LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..2957e70f588a51de0506b47577259c989f4febd1
--- /dev/null
+++ b/LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<div>Test passes if it does not crash</div>
+<script>
+if (window.testRunner) testRunner.dumpAsText();
+var div = document.createElement('div');
+var span = document.createElement('span');
+div.appendChild(span);
+var observer = new MutationObserver(function(){});
+observer.observe(div, { attributes: true, subtree: true });
+div.removeChild(span); // cause span to become transiently observed
+div = null;
+gc(); // collect div's wrapper
+observer.disconnect();
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/MutationObserver/disconnect-transient-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698