GC object are already non-extensible ([[IsExtensible]]
returns true
). Preventing extensions on a non-extensible object should be an no-op.
By returning false
to [[PreventExtensions]]
, any caller to Object.preventExtensions()
would get a thrown TypeError
even though the object is already non-extensible, which is surprising (even though it is not technically a violation of the object invariants).
To avoid this surprising behavior, WASM Garbage Collected Objects should return true
for [[PreventExtensions]]
.