| <!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 AtomicString containing only 8-bit characters doesn't confuse the JIT into thinking it's an 8-bit AtomicString."); |
| |
| o = {}; |
| |
| stringWithEmoji = "zest😐"; |
| var test16bit = stringWithEmoji.substring(0, 4); |
| |
| o[test16bit] = "this makes it an AtomicString"; |
| |
| 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> |