mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 697515 - WeakMap.set should return undefined, not itself. r=jorendorff.
--HG-- extra : rebase_source : 0e01d5899710f05bc1d8379eb1b98df5b40bade5
This commit is contained in:
parent
5874569a99
commit
a3f15c8871
@ -223,9 +223,9 @@ WeakMap_set(JSContext *cx, uintN argc, Value *vp)
|
||||
obj->setPrivate(map);
|
||||
}
|
||||
|
||||
args.thisv() = UndefinedValue();
|
||||
if (!map->put(key, value))
|
||||
goto out_of_memory;
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
|
||||
out_of_memory:
|
||||
|
@ -59,3 +59,4 @@ require-or(debugMode,skip) script regress-672804-3.js
|
||||
skip-if(!xulRuntime.shell) script regress-677589.js
|
||||
script regress-677924.js
|
||||
script regress-691746.js
|
||||
script regress-697515.js
|
||||
|
6
js/src/tests/js1_8_5/extensions/regress-697515.js
Normal file
6
js/src/tests/js1_8_5/extensions/regress-697515.js
Normal file
@ -0,0 +1,6 @@
|
||||
// Any copyright is dedicated to the Public Domain.
|
||||
// http://creativecommons.org/licenses/publicdomain/
|
||||
|
||||
assertEq(new WeakMap().set({}, 0), undefined);
|
||||
|
||||
reportCompare(0, 0, 'ok');
|
Loading…
Reference in New Issue
Block a user