Subj : Re: Sharing Javascript objects between different XUL windows. To : netscape.public.mozilla.jseng From : Peter Wilson Date : Thu Dec 30 2004 12:30 pm Somehow we have two different instances of the same DOM Element (see below). I tried QueryInterface to nsISupports: they are different objects. Interestingly, as well as the same siblings, parent etc. the two objects share the same attributes. I can set an attribute on one and read it back by the other. This happens even though I am not mutating the DOM in question. Could GC be causing this problem. The DOM is shared between different forms. I am also experiencing occaisional crashes. Is there any way to turn off GC from the Firefox command line to see if this eliminates the problem? 0001: theTreeSrcNode === srcNode $[2] = [boolean] false 0001: theTreeSrcNode.previousSibling === srcNode.previousSibling $[3] = [boolean] true 0001: srcNode.id $[6] = [string] "content-1" 0001: theTreeSrcNode.id $[7] = [string] "content-1" 0001: theTreeSrcNode == srcNode $[8] = [boolean] false 0001: theTreeSrcNode.QueryInterface(Components.interfaces.nsISupports) $[9] = [XULElement] [class: XULElement] {0} 0001: srcNode.QueryInterface(Components.interfaces.nsISupports) $[10] = [XULElement] [class: XULElement] {0} 0001: srcNode.QueryInterface(Components.interfaces.nsISupports) == theTreeSrcNode.QueryInterface(Components.interfaces.nsISupports) $[11] = [boolean] false 0001: theTreeSrcNode.setAttribute("TEST","TESTVal") $[12] = [void] void 0001: theTreeSrcNode.getAttribute("TEST") $[13] = [string] "TESTVal" 0001: srcNode.getAttribute("TEST") $[14] = [string] "TESTVal" .