| OLD | NEW |
| (Empty) |
| 1 description('This tests that properties on the classList persists GC.'); | |
| 2 | |
| 3 function gc() | |
| 4 { | |
| 5 if (window.GCController) | |
| 6 return GCController.collect(); | |
| 7 | |
| 8 for (var i = 0; i < 10000; i++) { | |
| 9 var s = new String; | |
| 10 } | |
| 11 } | |
| 12 | |
| 13 var d = document.createElement('div'); | |
| 14 | |
| 15 // Ensure the classList is created. | |
| 16 var classList = d.classList; | |
| 17 | |
| 18 // Set a custom property. | |
| 19 d.classList.life = 42; | |
| 20 shouldEvaluateTo('d.classList.life', 42); | |
| 21 | |
| 22 // Null out reference to the dataset. | |
| 23 classList = null; | |
| 24 | |
| 25 gc(); | |
| 26 | |
| 27 // Test that the classList wrapper persisted the GC and still has the custom pro
perty. | |
| 28 shouldEvaluateTo('d.classList.life', 42); | |
| OLD | NEW |