Re: [webcomponents] Custom elements disconnected from a document should not be upgraded (#419)

@rniwa I think I see now. The case in question is when there are no JS consumers holding a reference to the element at all, only the browser holding a single weak reference to it. Let `element` be such an element. Then:

- If the GC has run and collected the weak reference, nothing will happen when you register `x-foo`.
- If the GC has not run, and the weak reference still holds a pointer to `element`, registering `x-foo` will observably call the `XFoo` constructor on `element` to upgrade it.

And then the claim is that our GCs have no way to detect how many non-weak references there are to a given element. (Which seems reasonable, as otherwise they would probably be refcounting systems instead of GCs.)

This does seem problematic.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/419#issuecomment-193510151

Received on Monday, 7 March 2016 23:46:15 UTC