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');