blob: 1b2d4f0feb75dcf877ae7f8b0a96f9251c78e022 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Test that a 16-bit AtomString containing only 8-bit characters doesn't confuse the JIT into thinking it's an 8-bit AtomString.");
o = {};
stringWithEmoji = "zest😐";
var test16bit = stringWithEmoji.substring(0, 4);
o[test16bit] = "this makes it an AtomString";
globalRope = "";
function jittable(a, b) {
for (var i = 0; i < 5000; ++i) {
poisonedRope = a + b;
o[poisonedRope] = 1;
globalRope = "foo." + poisonedRope;
}
}
jittable("ze", "st");
shouldBe("globalRope", "'foo.zest'");
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>