diff options
author | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-02-25 01:03:57 +0000 |
commit | ceadffab6b357723981a429e11222daf6cd6dcfb (patch) | |
tree | 5603053048d6a460f79b22bdf165fb74d32d39b0 /js/src/jit-test | |
parent | 14fb2f966e9b54598c451e3cb35b4aa0480dafed (diff) | |
parent | ad5a13bd501e379517da1a944c104a11d951a3f5 (diff) | |
download | UXP-ceadffab6b357723981a429e11222daf6cd6dcfb.tar UXP-ceadffab6b357723981a429e11222daf6cd6dcfb.tar.gz UXP-ceadffab6b357723981a429e11222daf6cd6dcfb.tar.lz UXP-ceadffab6b357723981a429e11222daf6cd6dcfb.tar.xz UXP-ceadffab6b357723981a429e11222daf6cd6dcfb.zip |
Merge branch 'master' into releaseRC_20210225
Diffstat (limited to 'js/src/jit-test')
-rw-r--r-- | js/src/jit-test/tests/latin1/json.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/js/src/jit-test/tests/latin1/json.js b/js/src/jit-test/tests/latin1/json.js index 16559890d..ab7610cd5 100644 --- a/js/src/jit-test/tests/latin1/json.js +++ b/js/src/jit-test/tests/latin1/json.js @@ -55,13 +55,10 @@ function testEvalHackNotJSON() { arr = eval("[]; var z; [1, 2, 3, \"abc\u1200\"]"); assertEq(JSON.stringify(arr), '[1,2,3,"abc\u1200"]'); - try { - eval("[1, 2, 3, \"abc\u2028\"]"); - throw new Error("U+2028 shouldn't eval"); - } catch (e) { - assertEq(e instanceof SyntaxError, true, - "should have thrown a SyntaxError, instead got " + e); - } + // JSON superset + var arr = eval("[1, 2, 3, \"abc\u2028\"]"); + assertEq(arr.length, 4); + assertEq(arr[3], "abc\u2028"); } testEvalHackNotJSON(); |