[Webkit-unassigned] [Bug 171606] getOwnPropertyDescriptor on an indexed property for a typed array is wrong

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 3 11:03:27 PDT 2017


--- Comment #1 from Saam Barati <sbarati at apple.com> ---
I think the fix is trivial:
template<typename Adaptor>
bool JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot(
    JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    JSGenericTypedArrayView* thisObject = jsCast<JSGenericTypedArrayView*>(object);

    if (std::optional<uint32_t> index = parseIndex(propertyName)) {
        if (thisObject->isNeutered()) {
            slot.setCustom(thisObject, None, throwNeuteredTypedArrayTypeError);
            return true;

        if (thisObject->canGetIndexQuickly(index.value()))
            slot.setValue(thisObject, DontDelete | ReadOnly, thisObject->getIndexQuickly(index.value()));
            slot.setValue(thisObject, DontDelete | ReadOnly, jsUndefined());
        return true;

    return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
should not say ReadOnly.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170503/05bfecd5/attachment-0001.html>

More information about the webkit-unassigned mailing list