[Webkit-unassigned] [Bug 111250] New: AtomicHTMLToken should not be heap allocated or RefCounted

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 2 03:07:25 PST 2013


           Summary: AtomicHTMLToken should not be heap allocated or
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: abarth at webkit.org, tonyg at chromium.org
            Blocks: 106127

AtomicHTMLToken should not be heap allocated or RefCounted

This is done so that it can be saved on the HTMLElementStack, but it appears we only use this in 3 places:

  291          return false;
  292      if (item->hasTagName(MathMLNames::annotation_xmlTag)) {
  293:         Attribute* encodingAttr = item->token()->getAttributeItem(MathMLNames::encodingAttr);
  294          if (encodingAttr) {
  295              const String& encoding = encodingAttr->value();

  179      remainingCandidates.reserveInitialCapacity(candidates.size());
  181:     const Vector<Attribute>& attributes = newItem->token()->attributes();
  182      for (size_t i = 0; i < attributes.size(); ++i) {
  183          const Attribute& attribute = attributes[i];
  190              ASSERT(newItem->localName() == candidate->localName() && newItem->namespaceURI() == candidate->namespaceURI());
  192:             Attribute* candidateAttribute = candidate->token()->getAttributeItem(attribute.name());
  193              if (candidateAttribute && candidateAttribute->value() == attribute.value())
  194                  remainingCandidates.append(candidate);

This just adds an extra malloc, and some complexity to AtomicHTMLToken we don't need, including the ability to clear it's externalCharacterBuffer pointers so we don't grab at memory after its freed.  See bug 111248.

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