From dadd824d2c6aa0000897f975677f9bee5402faf9 Mon Sep 17 00:00:00 2001 From: Tom Schuster Date: Fri, 6 Mar 2015 14:25:47 -0800 Subject: [PATCH] Bug 1139696 - Test for cross-compartment Set/Map clone (r=billm) --- .../tests/structured-clone/Map-Set-cross-compartment.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js b/js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js index 11ee4e8d2d9f..8ce792562e8d 100644 --- a/js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js +++ b/js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js @@ -6,3 +6,6 @@ // Don't crash serialize(evalcx("new Set(['x', 'y'])")); serialize(evalcx("new Map([['x', 1]])")); + +assertEq(deserialize(serialize(evalcx("new Set([1, 2, 3])"))).has(1), true); +assertEq(deserialize(serialize(evalcx("new Map([['x', 1]])"))).get('x'), 1);