[Webkit-unassigned] [Bug 176810] for..in on a Proxy loops over non enumerable properties

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 22 12:21:22 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=176810

--- Comment #19 from Caitlin Potter (:caitp) <caitp at igalia.com> ---
(In reply to Caitlin Potter (:caitp) from comment #18)
> So there are a few issues at the moment.
> 
> The spec compliant fix for this particular issue, would be to filter the
> PropertyNameArray after getOwnPropertyNames() is completed. This ensures
> that it doesn't interfere with the invariant validation at the end.
> 
> There are a few other compliance issues, which are maybe less of an issue:
> 
> Duplicate property names. Currently, PropertyNameArray does not account for
> duplicates. Unfortunately, in the case of ProxyObject, duplicates are
> observable. However, there would be a performance penalty if
> PropertyNameArray were changed to support duplicates for all JSCell types
> --- So probably the thing to do is special case `getOwnPropertyNames` for
> ProxyObjects where needed.
> 
> There's a third failure in the WPT regression, which I believe is related to
> JSDOMConvertRecord not handling Symbol-named properties, which the test
> seems to expect. This looks like it should be simple enough to fix with
> 
> ```diff
> -        JSC::PropertyNameArray keys(&vm, JSC::PropertyNameMode::Strings,
> JSC::PrivateSymbolMode::Exclude);
> +        JSC::PropertyNameArray keys(&vm,
> JSC::PropertyNameMode::StringsAndSymbols, JSC::PrivateSymbolMode::Exclude);
>          object->methodTable(vm)->getOwnPropertyNames(object, &state, keys,
> JSC::EnumerationMode());
> ```
> 
> ---
> 
> So, I'm happy to provide fixes for 0-3 of these problems, but it's important
> to keep in mind that each one very likely will negatively impact performance
> in some way, for the sake of improved spec compliance in less common cases.

It looks like https://github.com/tc39/ecma262/pull/833 will incur a bit more work here, too

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190122/8609dc6b/attachment.html>


More information about the webkit-unassigned mailing list