Bug 1139696 - Test for cross-compartment Set/Map clone (r=billm)
authorTom Schuster <evilpies@gmail.com>
Fri, 06 Mar 2015 14:25:47 -0800
changeset 232664 5ddbdbc00f3c53f6b0e049d9c890ad4840e3c527
parent 232663 a420bed08857ed365c5cf9382b62868756df88fa
child 232665 beed1c584a2264aab11aa41484083ba49ba4c0ab
push id28390
push usercbook@mozilla.com
push dateTue, 10 Mar 2015 12:54:55 +0000
treeherdermozilla-central@c42e7e3bb0a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1139696
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1139696 - Test for cross-compartment Set/Map clone (r=billm)
js/src/jit-test/tests/structured-clone/Map-Set-cross-compartment.js
--- 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
@@ -1,8 +1,11 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/licenses/publicdomain/
  */
 
 // 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);