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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 25 08:46:33 PST 2011


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





--- Comment #6 from Darin Adler <darin at apple.com>  2011-01-25 08:46:33 PST ---
(In reply to comment #5)
> > > 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.

I’m not convinced. It would be straightforward to do what I asked.

Anyway, I’ll review again.

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