mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibJS: Object::put() shouldn't create own properties on prototype chain
Unless there is a setter present on the prototype chain, put() should only set own properties on the object itself. Fixes #1588.
This commit is contained in:
parent
a62230770b
commit
99aab4470a
2 changed files with 10 additions and 2 deletions
8
Libraries/LibJS/Tests/Object.prototype.toString.js
Normal file
8
Libraries/LibJS/Tests/Object.prototype.toString.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
function assert(x) { if (!x) throw 1; }
|
||||
|
||||
try {
|
||||
assert(typeof Object.prototype.toString() === "string");
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue