Bug: Reflect.ownKeys(function() {}) differs in V8 strict mode than other cases

Oriol Bugzilla oriol-bugzilla at hotmail.com
Tue Sep 6 02:12:17 UTC 2016

> So if all my code is in strict mode, and I get a non-strict code function to shadow as Tom and I were talking about in another thread... how do I even test for that if my code is either consistently strict or consistently non-strict?

Don't check that. The target could have other non-configurable properties added by the user anyway.

So just include the non-configurable own properties of the target in the property list returned by the trap.

Also consider using your own function as the target instead of the function provided by the user. This way you can be sure it will be a strict mode function, it will be extensible, and won't have any additional non-configurable own property. Then you will have less problems with proxy invariants.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160906/79e0dada/attachment.html>

More information about the es-discuss mailing list