[Bug 20567] Change [[Prototype]] for concept-node-adopt?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20567

--- Comment #48 from Erik Arvidsson <arv@chromium.org> ---
My main concerns about changing the [[Prototype]] on adopt is complexity and
consistency.

Complexity: We now need to enumerate all the properties of which we need to
change their values. What if this object is shared between different realms?
For example I have a two elements using the same value for their onclick webidl
attribute. Am I supposed to change the prototype of it?

Consistency: This only happens for nodes that are adopted. What about other
cross realm objects. What if I reference an object across the boundary without
adopting it (maybe it cannot be adopted).

I think playing the memory leak card is distraction. If you have multiple
realms that can reference each other there will be cross realm references. Both
the GC and the app author needs to be aware of this so that they do not hold on
to cross realm references longer than needed. Changing the [[Prototype]] on
adopt is not going to make this problem go away. It might alleviate the problem
a bit but I've yet to see any number on how much it will help in reality.
People could always use importNode if they needed to get a new fresh clone in
the new document. Better tools would probably be a better bang for the buck
than changing the [[Prototype]].

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 18 October 2013 14:24:59 UTC