[Webkit-unassigned] [Bug 52983] Eliminate m_tagHistory pointer from CSSSelector

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 24 20:10:49 PST 2011


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





--- Comment #5 from Antti Koivisto <koivisto at iki.fi>  2011-01-24 20:10:48 PST ---
> > Source/WebCore/css/CSSSelectorList.cpp:70
> > +            memcpy(&m_selectorArray[arrayIndex], selector, sizeof(CSSSelector));
> 
> It’s dangerous to move a CSSSelector this way unless the class knows about it; some classes have pointers into themselves or other such things. If we really need this move operation, we should make a function member of the CSSSelector class to do the work. That makes it more likely that someone changing CSSSelector around won’t invalidate this operation. We can just name the function move or moveIntoUninitializedMemory or something like that and make it either a member function or static member function.

I left this as is for now as CSSSelectorList and CSSSelector are already very tightly coupled.

-- 
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