ladybird/Libraries/LibJS/Tests/delete-globalThis-property-crash.js
Andreas Kling 2778d077e5 LibJS: Grow storage when adding a property to uniquely-shaped Object
Normally the storage would be expanded by set_shape() upon transition
to a new shape, but if the shape is already unique, there is no new
transition so we have to expand the storage manually.
2020-04-26 19:05:08 +02:00

10 lines
167 B
JavaScript

load("test-common.js");
try {
a = 1;
assert(delete globalThis.a === true);
a = 2;
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}