[ES6] Implement Reflect.ownKeys
Created attachment 257533 [details] Patch
Created attachment 257534 [details] Patch
Comment on attachment 257534 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257534&action=review > Source/JavaScriptCore/runtime/ObjectConstructor.cpp:280 > + return JSValue::encode(ownPropertyKeys(exec, object, PropertyNameMode::Both, DontEnumPropertiesMode::Exclude)); It's not new in this patch, but I find the name PropertyNameMode::Both confusing since when I am reading it, I don't know what Both applies to. Perhaps an explicit StringsAndSymbols would be better. But again, has nothing to do with this patch.
Comment on attachment 257534 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257534&action=review Thanks for your review! >> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:280 >> + return JSValue::encode(ownPropertyKeys(exec, object, PropertyNameMode::Both, DontEnumPropertiesMode::Exclude)); > > It's not new in this patch, but I find the name PropertyNameMode::Both confusing since when I am reading it, I don't know what Both applies to. Perhaps an explicit StringsAndSymbols would be better. But again, has nothing to do with this patch. Make sense. I'll open the issue to rename PropertyNameMode::Both to PropertyNameMode::StringsAndSymbols!
Comment on attachment 257534 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257534&action=review >>> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:280 >>> + return JSValue::encode(ownPropertyKeys(exec, object, PropertyNameMode::Both, DontEnumPropertiesMode::Exclude)); >> >> It's not new in this patch, but I find the name PropertyNameMode::Both confusing since when I am reading it, I don't know what Both applies to. Perhaps an explicit StringsAndSymbols would be better. But again, has nothing to do with this patch. > > Make sense. I'll open the issue to rename PropertyNameMode::Both to PropertyNameMode::StringsAndSymbols! Opened the issue to fix it. https://bugs.webkit.org/show_bug.cgi?id=147311
Committed r187408: <http://trac.webkit.org/changeset/187408>
Comment on attachment 257534 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257534&action=review > Source/JavaScriptCore/runtime/ObjectConstructor.cpp:629 > + ASSERT(!identifier.isSymbol()); This statement here broke the Debug build.
Committed r187409: <http://trac.webkit.org/changeset/187409>
(In reply to comment #7) > Comment on attachment 257534 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=257534&action=review > > > Source/JavaScriptCore/runtime/ObjectConstructor.cpp:629 > > + ASSERT(!identifier.isSymbol()); > > This statement here broke the Debug build. Thanks, I've fixed it!