<!DOCTYPE html> | |
<html> | |
<body> | |
<script src="../../resources/js-test-pre.js"></script> | |
<script> | |
description("Tests what happens when you make prototype chain accesses with impure GetOwnPropertySlot traps in the way."); | |
document.foo = function () {}; | |
function f() { | |
return document.foo; | |
} | |
var expected = "\"function\""; | |
for (var i = 0; i < 50; ++i) { | |
if (i == 45) { | |
var img = new Image(); | |
img.name = "foo"; | |
document.body.appendChild(img); | |
expected = "\"object\""; | |
} | |
v = f(); | |
shouldBe("typeof f()", expected); | |
} | |
</script> | |
<script src="../../resources/js-test-post.js"></script> | |
</body> | |
</html> |