Sign in
cobalt
/
cobalt
/
71840339e1109efe930df5c60712d91cdcc962a8
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
collections
/
WeakMap-set-returns-this.js
blob: f62c75fa1aad4340b08cd903251fd71ed0e99430 [
file
] [
log
] [
blame
]
// Bug 1031632 - Map.prototype.set, WeakMap.prototype.set and
// Set.prototype.add should be chainable
var
wm
=
new
WeakMap
();
var
bar
=
{};
assertEq
(
wm
.
set
(
bar
,
'BAR'
),
wm
);
var
foo
=
{};
var
a
=
wm
.
set
(
foo
,
'FOO'
).
get
(
foo
);
assertEq
(
a
,
'FOO'
);