Skip to content

fix Object.defineProperty sharing values across instances#1697

Open
RealColdFry wants to merge 1 commit intoTypeScriptToLua:masterfrom
RealColdFry:fix/object-define-property-instance-isolation
Open

fix Object.defineProperty sharing values across instances#1697
RealColdFry wants to merge 1 commit intoTypeScriptToLua:masterfrom
RealColdFry:fix/object-define-property-instance-isolation

Conversation

@RealColdFry
Copy link
Contributor

When Object.defineProperty is called on an instance (not a prototype), create a per-instance metatable if the shared metatable already has descriptors, so that each instance gets its own descriptor storage.

Fixes #1625

When Object.defineProperty is called on an instance (not a prototype),
create a per-instance metatable if the shared metatable already has
descriptors, so that each instance gets its own descriptor storage.

Fixes TypeScriptToLua#1625
@RealColdFry RealColdFry marked this pull request as ready for review March 27, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Object.defineProperty share same value across different object instance

1 participant