tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Map-Set-cross-compartment.js (367B)


      1 /*
      2 * Any copyright is dedicated to the Public Domain.
      3 * http://creativecommons.org/licenses/publicdomain/
      4 */
      5 
      6 // Don't crash
      7 serialize(evalcx("new Set(['x', 'y'])"));
      8 serialize(evalcx("new Map([['x', 1]])"));
      9 
     10 assertEq(deserialize(serialize(evalcx("new Set([1, 2, 3])"))).has(1), true);
     11 assertEq(deserialize(serialize(evalcx("new Map([['x', 1]])"))).get('x'), 1);