[Webkit-unassigned] [Bug 146047] REGRESSION(182495): Error's "column" property should not be readonly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 16 22:33:45 PDT 2015


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

--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org> ---
(In reply to comment #3)
> > > Object.getOwnPropertyDescriptor(error, "lineNumber")
> > < {value: 1, writable: true, enumerable: true, configurable: true} = $3
> 
> Ahh, this is misleading since no such property already existed, this was
> just added by me.
> 
> I think the relevant part of the original change was:
> 
> +        obj->putDirect(vm, vm.propertyNames->line, jsNumber(line), ReadOnly
> | DontDelete);
> +        obj->putDirect(vm, vm.propertyNames->column, jsNumber(column),
> ReadOnly | DontDelete);

Actually the original code had something very similar. So I don't actually see how this was writable before... but there is certainly some visible change here.

Other browsers have different property names and descriptor attributes for the error properties. There is no standardization at all with Errors. That said, making the property writable seems reasonable.

Firefox:

    js> Object.getOwnPropertyNames(new Error)
    Array [ "fileName", "lineNumber", "columnNumber" ]

    js> Object.getOwnPropertyDescriptor(new Error, "lineNumber")
    Object { value: 1, writable: true, enumerable: false, configurable: true }

Chrome:

    js> Object.getOwnPropertyNames(new Error)
    ["stack"]

    js> Object.getOwnPropertyDescriptor(new Error, "stack")
    Object {enumerable: false, configurable: true}

-- 
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/20150617/a73e585d/attachment.html>


More information about the webkit-unassigned mailing list