[Webkit-unassigned] [Bug 106963] Move TreeScope pointer to ContainerNode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 16 02:52:05 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106963





--- Comment #10 from Antti Koivisto <koivisto at iki.fi>  2013-01-16 02:53:49 PST ---
(In reply to comment #4)
> (From update of attachment 182882 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=182882&action=review
> 
> > Source/WebCore/dom/Node.h:810
> > +    union {
> > +        ContainerNode* m_parentOrHostNode;
> > +        TreeScope* m_treeScopeForParentlessNonContainer;
> > +    };
> 
> It's very unfortunate that we have to use union for such an edge case :(

Yeah. It is double silly since both TreeScope types are actually ContainerNodes. 

Maybe the case is rare enough to shove the tree scope to a map. The case is easy enough to hit by by trying though

javascript:alert(document.createTextNode().ownerDocument)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list