<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:joepeck@webkit.org" title="Joseph Pecoraro <joepeck@webkit.org>"> <span class="fn">Joseph Pecoraro</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - NodeList has issues with Symbol"
href="https://bugs.webkit.org/show_bug.cgi?id=144310">bug 144310</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Assignee</td>
<td>webkit-unassigned@lists.webkit.org
</td>
<td>joepeck@webkit.org
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - NodeList has issues with Symbol"
href="https://bugs.webkit.org/show_bug.cgi?id=144310#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - NodeList has issues with Symbol"
href="https://bugs.webkit.org/show_bug.cgi?id=144310">bug 144310</a>
from <span class="vcard"><a class="email" href="mailto:joepeck@webkit.org" title="Joseph Pecoraro <joepeck@webkit.org>"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
<pre>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 }</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>