1 <!DOCTYPE html> 2 3 <p> 4 Tests that reference cycles between the observer and the callback do not 5 create leaks. 6 </p> 7 8 <script> 9 if (window.testRunner) 10 testRunner.dumpAsText(); 11 12 function leak() { 13 var observer = new WebKitMutationObserver(function() { observer.disconnect(); }); 14 } 15 16 for (i=0; i < 1000; i++) leak(); 17 gc(); 18 </script> 19