[Webkit-unassigned] [Bug 33696] let's cache nodelists instead of dynamicnodelist::cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 28 10:53:45 PDT 2010


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





--- Comment #104 from Darin Adler <darin at apple.com>  2010-04-28 10:53:43 PST ---
(In reply to comment #103)
> (In reply to comment #102)
> > (From update of attachment 54443 [details] [details])
> > > +    , m_classNamesOriginal(classNames)
> > 
> > Instead of adding this and making every ClassNodeList bigger, you should add an
> > originalString() function to the SpaceSplitString class, which already keeps a
> > copy of the original string. (If you kept this, then you'd want to give it a
> > better name.)
> 
> I've started what you proposed but noticed that
> SpaceSplitStringData::createVector mutates string:
> 
>  49     if (m_shouldFoldCase && hasNonASCIIOrUpper(m_string))
>  50         m_string = m_string.foldCase();
> 
> So for now I decided to keep a copy (renamed to m_originalClassNames), but I'll
> do something about it if you still prefer to fetch original string from the
> SpaceSplitString.  After all I could probably use it as a key (just thinking)

I was completely wrong. SpaceSplitString does *not* keep the string around
after parsing it. At the end of that function it sets m_string to null.

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