W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

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

From: <bugzilla@jessica.w3.org>
Date: Fri, 18 Oct 2013 14:24:56 +0000
To: public-script-coord@w3.org
Message-ID: <bug-20567-3890-BkKwxhcrJt@http.www.w3.org/Bugs/Public/>

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

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC