<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [test262] Fixing mapped arguments object property test case"
href="https://bugs.webkit.org/show_bug.cgi?id=159398#c74">Comment # 74</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [test262] Fixing mapped arguments object property test case"
href="https://bugs.webkit.org/show_bug.cgi?id=159398">bug 159398</a>
from <span class="vcard"><a class="email" href="mailto:ticaiolima@gmail.com" title="Caio Lima <ticaiolima@gmail.com>"> <span class="fn">Caio Lima</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=159398#c73">comment #73</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=291051&action=diff" name="attach_291051" title="Patch">attachment 291051</a> <a href="attachment.cgi?id=291051&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=291051&action=review">https://bugs.webkit.org/attachment.cgi?id=291051&action=review</a>
>
> > 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:
> <a href="https://tc39.github.io/ecma262/#sec-validateandapplypropertydescriptor">https://tc39.github.io/ecma262/#sec-validateandapplypropertydescriptor</a>
> more or less here, with some extra rules defined in:
> <a href="https://tc39.github.io/ecma262/#sec-arguments-exotic-objects">https://tc39.github.io/ecma262/#sec-arguments-exotic-objects</a>-
> defineownproperty-p-desc</span >
Yes. Actually, this patch is totally incorrect. I can reuse some code, but I need a totally different approach. The current Mapping is controlled by m_overrides. I think that finally I understood this mechanism. The idea is to override things as soon as we define a different descriptor from default and fallback operations like defineOwnProperty, getOwnProperty and delete to Base. The problem of this approach is that the ES6 mapping rules changed and this mechanism need to be fixed. I am with a new idea in mind that is separate fallBack operations to Base from mapping rules and I think it can work.
<span class="quote">> 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 creatina
> 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.</span >
Also, this test case Is incorrect and I am going to remove it. I already created a test case validating spec behavior (<a href="https://tc39.github.io/ecma262/#sec-arguments-exotic-objects-defineownproperty-p-desc">https://tc39.github.io/ecma262/#sec-arguments-exotic-objects-defineownproperty-p-desc</a>).</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>