[Webkit-unassigned] [Bug 159398] [test262] Fixing mapped arguments object property test case

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 11 20:52:53 PDT 2016


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

Saam Barati <sbarati at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #291051|review?                     |review-
              Flags|                            |

--- Comment #73 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 291051
  --> https://bugs.webkit.org/attachment.cgi?id=291051
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291051&action=review

> Source/JavaScriptCore/runtime/GenericArgumentsInlines.h:194
> +        if (optionalIndex && !thisObject->isConfigurable(optionalIndex.value()) && !descriptor.justWritablePresent())

I'm not sure this is correct here. I think you want to be following:
https://tc39.github.io/ecma262/#sec-validateandapplypropertydescriptor
more or less here, with some extra rules defined in:
https://tc39.github.io/ecma262/#sec-arguments-exotic-objects-defineownproperty-p-desc

It looks like the code below falls back to normal object storage. Why not just fall back to normal object storage in every case instead of creating the isConfigurable map?

> JSTests/stress/arguments-non-configurable.js:27
> +function tryChangeWritableOfNonConfigurableDescriptor(x) {
> +    Object.defineProperty(arguments, 0, {configurable: false});
> +    Object.defineProperty(arguments, 0, {writable: true});
> +    Object.defineProperty(arguments, 0, {writable: false});
> +}

This is the specified behavior? This goes against normal object behavior:

>>> Object.defineProperty(o, "f", {configurable: false, value: 20})
[object Object]
>>> o.f
20
>>> o.f = 40
40
>>> o.f
20
>>> Object.defineProperty(o, "f", {writable: true, value:50})
Exception: TypeError: Attempting to change writable attribute of unconfigurable property.

-- 
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/20161012/a9f732ef/attachment-0001.html>


More information about the webkit-unassigned mailing list