summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html')
-rw-r--r--LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html
new file mode 100644
index 0000000..19d08d7
--- /dev/null
+++ b/LayoutTests/fast/dom/NodeList/5725058-crash-scenario-1.html
@@ -0,0 +1,25 @@
+<p>Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred.</p>
+
+<span>
+ <div name='test'></div>
+</span>
+<script type='text/javascript'>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ function triggerGarbageCollection()
+ {
+ if (window.GCController) {
+ GCController.collect();
+ return;
+ }
+ for (var i = 0; i < 10000; ++i)
+ ({})
+ }
+
+ document.getElementsByName('test')[0];
+ triggerGarbageCollection();
+ document.getElementsByTagName('span')[0].innerHTML = '';
+ triggerGarbageCollection();
+ document.getElementsByName('test')[0];
+</script>