<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&#64;gmail.com" title="Caio Lima &lt;ticaiolima&#64;gmail.com&gt;"> <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">&gt; Comment on <span class=""><a href="attachment.cgi?id=291051&amp;action=diff" name="attach_291051" title="Patch">attachment 291051</a> <a href="attachment.cgi?id=291051&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=291051&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=291051&amp;action=review</a>
&gt; 
&gt; &gt; Source/JavaScriptCore/runtime/GenericArgumentsInlines.h:194
&gt; &gt; +        if (optionalIndex &amp;&amp; !thisObject-&gt;isConfigurable(optionalIndex.value()) &amp;&amp; !descriptor.justWritablePresent())
&gt; 
&gt; I'm not sure this is correct here. I think you want to be following:
&gt; <a href="https://tc39.github.io/ecma262/#sec-validateandapplypropertydescriptor">https://tc39.github.io/ecma262/#sec-validateandapplypropertydescriptor</a>
&gt; more or less here, with some extra rules defined in:
&gt; <a href="https://tc39.github.io/ecma262/#sec-arguments-exotic-objects">https://tc39.github.io/ecma262/#sec-arguments-exotic-objects</a>-
&gt; 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">&gt; It looks like the code below falls back to normal object storage. Why not
&gt; just fall back to normal object storage in every case instead of creatina
&gt; the isConfigurable map?
&gt; 
&gt; &gt; JSTests/stress/arguments-non-configurable.js:27
&gt; &gt; +function tryChangeWritableOfNonConfigurableDescriptor(x) {
&gt; &gt; +    Object.defineProperty(arguments, 0, {configurable: false});
&gt; &gt; +    Object.defineProperty(arguments, 0, {writable: true});
&gt; &gt; +    Object.defineProperty(arguments, 0, {writable: false});
&gt; &gt; +}
&gt; 
&gt; This is the specified behavior? This goes against normal object behavior:
&gt; 
&gt; &gt;&gt;&gt; Object.defineProperty(o, &quot;f&quot;, {configurable: false, value: 20})
&gt; [object Object]
&gt; &gt;&gt;&gt; o.f
&gt; 20
&gt; &gt;&gt;&gt; o.f = 40
&gt; 40
&gt; &gt;&gt;&gt; o.f
&gt; 20
&gt; &gt;&gt;&gt; Object.defineProperty(o, &quot;f&quot;, {writable: true, value:50})
&gt; Exception: TypeError: Attempting to change writable attribute of
&gt; 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>