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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 27 12:40:23 PDT 2010


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


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54443|review?                     |review-
               Flag|                            |




--- Comment #102 from Darin Adler <darin at apple.com>  2010-04-27 12:40:22 PST ---
(From update of attachment 54443)
> +    , 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.)

> +    ASSERT(list->hasOwnCaches());
> +    UNUSED_PARAM(list);

The ASSERT_UNUSED macro should be used in cases like this.

> +    ASSERT(list == data->m_classNodeListCache.get(className));

The ASSERT_UNUSED macro should be used in cases like this.

> +    ASSERT(list->hasOwnCaches());
> +    UNUSED_PARAM(list);

The ASSERT_UNUSED macro should be used in cases like this.

> +    ASSERT(list == data->m_nameNodeListCache.get(nodeName));

The ASSERT_UNUSED macro should be used in cases like this.

> +    ASSERT(list->hasOwnCaches());
> +    UNUSED_PARAM(list);

The ASSERT_UNUSED macro should be used in cases like this.

> +    ASSERT(list == data->m_tagNodeListCache.get(name));

The ASSERT_UNUSED macro should be used in cases like this.

> +    PassRefPtr<TagNodeList> list = TagNodeList::create(this, namespaceURI.isEmpty() ? nullAtom : namespaceURI, localNameAtom);

Local variables should have a type of RefPtr, not PassRefPtr. See
<http://webkit.org/coding/RefPtr.html>.

> +    PassRefPtr<NameNodeList> list = NameNodeList::create(this, elementName);

Local variables should have a type of RefPtr, not PassRefPtr. See
<http://webkit.org/coding/RefPtr.html>.

> +    m_rootNode->removeCachedTagNodeList(this, QualifiedName(nullAtom, m_localName, m_namespaceURI));

We might want to store this as a QualifiedName in the first place.

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