[w3c/webcomponents] Forbid reentrance to `customElements.define` (#545)

The current spec defines the notion of a [*set of being-defined names*](https://html.spec.whatwg.org/#set-of-being-defined-names) and a [*set of being-defined constructors*](https://html.spec.whatwg.org/#set-of-being-defined-constructors) to deal with the situation in which `CustomElementsRegistry.prorotype.define` is called inside `Get` invocations; i.e. a re-entrant call to `define`.

However, this situation is more easily avoided if we just added a global flag indicating whether we're inside `define` or not.  I can't think of a situation in which one would need a re-entrant behavior in `define` since making a call to `define` invokes trapping `Get(constructor, "prototype")` or other `Get`s to callback and `observedAttributes`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/545

Received on Friday, 12 August 2016 03:03:51 UTC