mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
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.
This commit is contained in:
parent
c9c1d1fae0
commit
2778d077e5
2 changed files with 11 additions and 0 deletions
10
Libraries/LibJS/Tests/delete-globalThis-property-crash.js
Normal file
10
Libraries/LibJS/Tests/delete-globalThis-property-crash.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
load("test-common.js");
|
||||
|
||||
try {
|
||||
a = 1;
|
||||
assert(delete globalThis.a === true);
|
||||
a = 2;
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue