<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES2016] Implement Object.values"
   href="https://bugs.webkit.org/show_bug.cgi?id=160410">bug 160410</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #285142 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES2016] Implement Object.values"
   href="https://bugs.webkit.org/show_bug.cgi?id=160410#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES2016] Implement Object.values"
   href="https://bugs.webkit.org/show_bug.cgi?id=160410">bug 160410</a>
              from <span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=285142&amp;action=diff" name="attach_285142" title="Patch">attachment 285142</a> <a href="attachment.cgi?id=285142&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=285142&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=285142&amp;action=review</a>

<span class="quote">&gt; Source/JavaScriptCore/runtime/ObjectConstructor.cpp:781
&gt; +// <a href="http://tc39.github.io/proposal-object-values-entries/">http://tc39.github.io/proposal-object-values-entries/</a></span >

Lets provide links to the spec instead of proposals.

<span class="quote">&gt; Source/JavaScriptCore/runtime/ObjectConstructor.cpp:783
&gt; +JSArray* ownEnumerableProperties(ExecState* exec, JSObject* object, ResultKind resultKind, DontEnumPropertiesMode dontEnumPropertiesMode)</span >

I'd really like to see this written in JavaScript as a builtin instead.
It'd probably require making certain Reflect APIs and maybe Reflect itself available as a private symbol.
I think that would remove a certain class of bugs and might even be faster if it gets inlined into the caller.

<span class="quote">&gt; Source/JavaScriptCore/runtime/ObjectConstructor.cpp:802
&gt; +            keys-&gt;push(exec, jsOwnedString(exec, identifier.string()));</span >

can push() throw an exception?

<span class="quote">&gt; Source/JavaScriptCore/runtime/ObjectConstructor.cpp:813
&gt; +            JSValue result = baseValue.get(exec, identifier, slot);</span >

This needs an exception check afterwards if you keep it in C++ code

<span class="quote">&gt; Source/JavaScriptCore/runtime/ObjectConstructor.h:36
&gt; +EncodedJSValue JSC_HOST_CALL ownEnumerablePropertyValues(ExecState*);</span >

Not used.

<span class="quote">&gt; Source/JavaScriptCore/runtime/ObjectConstructor.h:43
&gt; +enum class ResultKind {
&gt; +    Key = 1 &lt;&lt; 0,
&gt; +    Value = 1 &lt;&lt; 1,
&gt; +    KeyAndValue = Key | Value,
&gt; +};</span >

Don't we already have an enum that represents this?

<span class="quote">&gt; JSTests/stress/object-values.js:1
&gt; +var obj = Object.create({ a: &quot;qux&quot;, d: &quot;qux&quot; });</span >

Lets add some Proxy tests and ensure proper methods are called.</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>