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
commit 15edad8202
Notes: sideshowbarker 2024-07-18 11:39:31 +09:00
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++) {