blob: 7e221b6f2a38e9c4625ca8cf68ae202a81833b30 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description('MutationObserver wrappers should survive GC for passing into the callback even if JS has lost references.');
jsTestIsAsync = true;
function addObserver(node, fn) {
var observer = new MutationObserver(fn);
observer.testProperty = true;
observer.observe(node, {attributes:true});
}
onload = function() {
addObserver(document.body, function(records, observer) {
window.observer = observer;
shouldBe('observer.testProperty', 'true');
finishJSTest();
});
gc();
document.body.setAttribute('touch', 'the node');
};
</script>
<script src="../../../resources/js-test-post.js"></script>