зеркало из https://github.com/mozilla/gecko-dev.git
Bug 697515 - WeakMap.set should return undefined, not itself. r=jorendorff.
--HG-- extra : rebase_source : 0e01d5899710f05bc1d8379eb1b98df5b40bade5
This commit is contained in:
Родитель
8d619423ae
Коммит
4b991caa23
|
@ -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
|
||||
|
|
|
@ -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');
|
Загрузка…
Ссылка в новой задаче