diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/str-atom-cache-extensible.js')
-rw-r--r-- | js/src/jit-test/tests/basic/str-atom-cache-extensible.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/str-atom-cache-extensible.js b/js/src/jit-test/tests/basic/str-atom-cache-extensible.js new file mode 100644 index 0000000000..bee8f13847 --- /dev/null +++ b/js/src/jit-test/tests/basic/str-atom-cache-extensible.js @@ -0,0 +1,15 @@ +// Create an extensible string. +var extensible = "foo".repeat(50); +extensible += "bar"; +extensible.indexOf("X"); + +// Ensure it's in the StringToAtomCache. +var obj = {}; +obj[extensible] = 1; + +// Make it a dependent string. +var other = extensible + "baz"; +other.indexOf("X"); + +// Must still be in the cache. +obj[extensible] = 1; |