Index: LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html |
diff --git a/LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html b/LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d7d706d7c14cb19cbd6f1472fed69cfce1e42e05 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/MutationObserver/mutation-callback-dead-context-crash.html |
@@ -0,0 +1,22 @@ |
+<div id=test><iframe src="#test" onload="setTimeout(crash, 0)"></iframe></div> |
+<script> |
+if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+} |
+var observer = new MutationObserver(function() {}); |
+observer.observe(document.querySelector('#test'), { attributes: true }); |
+function crash() { |
+ if (window.top === window) { |
+ var iframe = document.querySelector('iframe'); |
+ var otherDocument = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html"); |
+ otherDocument.adoptNode(iframe.contentDocument.documentElement); |
+ otherDocument.documentElement.appendChild(iframe); |
+ gc(); |
+ setTimeout(function() { |
+ console.log('Test passes if it prints this message without crashing'); |
+ testRunner.notifyDone(); |
+ }, 0); |
+ } |
+} |
+</script> |