<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:sbarati@apple.com" title="Saam Barati <sbarati@apple.com>"> <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@apple.com" title="Saam Barati <sbarati@apple.com>"> <span class="fn">Saam Barati</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=285142&action=diff" name="attach_285142" title="Patch">attachment 285142</a> <a href="attachment.cgi?id=285142&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=285142&action=review">https://bugs.webkit.org/attachment.cgi?id=285142&action=review</a>
<span class="quote">> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:781
> +// <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">> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:783
> +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">> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:802
> + keys->push(exec, jsOwnedString(exec, identifier.string()));</span >
can push() throw an exception?
<span class="quote">> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:813
> + JSValue result = baseValue.get(exec, identifier, slot);</span >
This needs an exception check afterwards if you keep it in C++ code
<span class="quote">> Source/JavaScriptCore/runtime/ObjectConstructor.h:36
> +EncodedJSValue JSC_HOST_CALL ownEnumerablePropertyValues(ExecState*);</span >
Not used.
<span class="quote">> Source/JavaScriptCore/runtime/ObjectConstructor.h:43
> +enum class ResultKind {
> + Key = 1 << 0,
> + Value = 1 << 1,
> + KeyAndValue = Key | Value,
> +};</span >
Don't we already have an enum that represents this?
<span class="quote">> JSTests/stress/object-values.js:1
> +var obj = Object.create({ a: "qux", d: "qux" });</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>