mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 950722 - Add a test for interaction between WeakMap and moving GC r=terrence
This commit is contained in:
parent
c33f723f69
commit
94055ad9bd
12
js/src/jit-test/tests/collections/WeakMap-moving-gc.js
Normal file
12
js/src/jit-test/tests/collections/WeakMap-moving-gc.js
Normal file
@ -0,0 +1,12 @@
|
||||
var wm = new WeakMap;
|
||||
var A = [];
|
||||
for (var i = 0; i < 1024; ++i) {
|
||||
var key = {i:i};
|
||||
wm.set(key, i);
|
||||
A.push(key);
|
||||
}
|
||||
gc();
|
||||
for (var i in A) {
|
||||
var key = A[i];
|
||||
assertEq(wm.has(key), true);
|
||||
}
|
Loading…
Reference in New Issue
Block a user