Fix adding fast arrays as keys to a weak container (#3362)

Fixes #3359.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-11-26 08:21:33 +01:00
committed by Zoltan Herczeg
parent 2e8a8f5caa
commit 16d0e83b64
3 changed files with 9 additions and 0 deletions
+2
View File
@@ -135,6 +135,8 @@ try {
assert (e instanceof TypeError);
}
m1.set([], []);
assert (WeakMap.prototype.toString() === "[object WeakMap]");
WeakMap.prototype.set = function () { throw "abrupt set" };
+2
View File
@@ -119,6 +119,8 @@ try {
assert (e instanceof TypeError);
}
m1.add([]);
assert (WeakSet.prototype.toString() === "[object WeakSet]");
WeakSet.prototype.add = function () { throw "abrupt add" };