<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [JSC] Properties with private symbols (internal slots) should be accessed with &#64;getByValDirect"
   href="https://bugs.webkit.org/show_bug.cgi?id=154826">154826</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[JSC] Properties with private symbols (internal slots) should be accessed with &#64;getByValDirect
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>utatane.tea&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The private symbols are used to implement internal slots[1].
But the internal slots should not be properties. That means,
&quot;Internal slots are not object properties and they are not inherited.&quot;

Since the current internal slots are implemented as properties and accessed through normal [[Get]], the access searches through prototype chains.
So, for example,

var crafted = { __proto__: promise }

works with the Promise methods.

And when fixing this issue, we should change the current Proxy's semantics for the private symbols.
Currently, the Proxy redirects the access with the private symbols to the target.
But this should not be done. Instead, the Proxy should work as if it does not have any properties named &quot;the given private name&quot;.

[1]: <a href="http://ecma-international.org/ecma-262/6.0/#sec-object-internal-methods-and-internal-slots">http://ecma-international.org/ecma-262/6.0/#sec-object-internal-methods-and-internal-slots</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>