ajvincent / es-membrane

An ECMAScript implementation of a Membrane, allowing users to dynamically hide, override, or extend objects in JavaScript with controlled effects on the original objects.
ISC License
109 stars 13 forks source link

ObjectGraph refactor: Explicitly test for sealed-cyclic problem #212

Open ajvincent opened 5 years ago

ajvincent commented 5 years ago

Any sealed cycles should be solvable in the refactor by:

  1. Creating each cycle's proxy object inside the membrane
  2. Calling the ObjectGraph's head proxy handler directly with the new shadow target, NOT going through the new proxy.

This way, we don't trigger JS engine invariants until after the cycle is sealed.

Blocks #179