| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <div> |
| <select id="myselect"> |
| <option>A</option> |
| <option>B</option> |
| <option>C</option> |
| </select> |
| </div> |
| <script> |
| description("This test checks that removing a <select> object from the DOM, then garbage collecting, then removing an option from select.options doesn't crash."); |
| |
| var select = document.getElementById("myselect"); |
| var options = select.options; |
| select.parentNode.removeChild(select); |
| select = null; |
| |
| // create lots of objects to force a garbage collection |
| var i = 0; |
| var s; |
| while (i < 5000) { |
| i = i+1.11; |
| s = s + " "; |
| } |
| |
| options.remove(0); |
| testPassed("No crash"); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |