mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
LibJS: Return specified object from Object.setPrototypeOf()
We were leaking an empty value.
This commit is contained in:
parent
a60a5bc70a
commit
1a64bdd80c
2 changed files with 13 additions and 1 deletions
12
Libraries/LibJS/Tests/Object.setPrototypeOf.js
Normal file
12
Libraries/LibJS/Tests/Object.setPrototypeOf.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
load("test-common.js");
|
||||
|
||||
try {
|
||||
assert(Object.setPrototypeOf.length === 2);
|
||||
|
||||
o = {};
|
||||
assert(Object.setPrototypeOf(o, {}) === o);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue