[Webkit-unassigned] [Bug 144310] NodeList has issues with Symbol

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 28 12:26:03 PDT 2015


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

Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|webkit-unassigned at lists.web |joepeck at webkit.org
                   |kit.org                     |

--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org> ---
Yes, the issue here is:

   54      bool JSNodeList::getOwnPropertySlotDelegate(ExecState* exec, PropertyName propertyName, PropertySlot& slot)
   55      {
-> 56          if (Node* item = impl().namedItem(propertyNameToAtomicString(propertyName))) {
   57              slot.setValue(this, ReadOnly | DontDelete | DontEnum, toJS(exec, globalObject(), item));
   58              return true;
   59          }

The propertyNameToAtomicString converts the Symbol PropertyName to AtomicString(nullptr), which later matches a "namedItem" comparing to an element's non-existent idAttribute (line 72):

   68      Node* StaticElementList::namedItem(const AtomicString& elementId) const
   69      {
   70          for (unsigned i = 0, length = m_elements.size(); i < length; ++i) {
   71              Element& element = const_cast<Element&>(m_elements[i].get());
   72              if (element.getIdAttribute() == elementId)
   73                  return &element;
   74          }
   75          return nullptr;
   76      }

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150428/0accb176/attachment.html>


More information about the webkit-unassigned mailing list