1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:27:35 +00:00

LibJS: Make define_property always throw if specified

Now put uses is_strict_mode to determine define_property should throw
This commit is contained in:
davidot 2021-06-21 16:32:07 +02:00 committed by Linus Groh
parent e10219a293
commit 15edad8202
2 changed files with 4 additions and 5 deletions

View file

@ -26,7 +26,7 @@ test("Issue #5884, GenericIndexedPropertyStorage::take_first() loses elements",
const a = [];
for (let i = 0; i < 300; i++) {
// NOTE: We use defineProperty to prevent the array from using SimpleIndexedPropertyStorage
Object.defineProperty(a, i, { value: i, writable: false });
Object.defineProperty(a, i, { value: i, configurable: true });
}
expect(a.length).toBe(300);
for (let i = 0; i < 300; i++) {