Hello v8-dev,

I am trying to work on the issue 
https://bugs.chromium.org/p/v8/issues/detail?id=13728 which is a bug 
noticed from nodejs, as a first time contributor the docs suggest that I 
reach out here first before working on a issue. Already some of the 
debugging of the issue has been done on the original thread on nodejs repo 
@ https://github.com/nodejs/node/issues/41714, the crux of the matter being 
that the function `FilterProxyKeys` seems to ignore the 
`v8::IndexFilter::kSkipIndices` property passed to `GetPropertyNames`, I 
attempted to solve this with the following diff

```diff
diff --git a/deps/v8/src/objects/keys.cc b/deps/v8/src/objects/keys.cc
index a0796864f1..4f84cd9094 100644
--- a/deps/v8/src/objects/keys.cc
+++ b/deps/v8/src/objects/keys.cc
@@ -182,8 +182,9 @@ ExceptionStatus 
KeyAccumulator::AddKeys(Handle<JSObject> array_like,
 MaybeHandle<FixedArray> FilterProxyKeys(KeyAccumulator* accumulator,
                                         Handle<JSProxy> owner,
                                         Handle<FixedArray> keys,
-                                        PropertyFilter filter) {
-  if (filter == ALL_PROPERTIES) {
+                                        PropertyFilter filter,
+                                        bool skip_indices) {
+  if (filter == ALL_PROPERTIES  && !skip_indices) {
     // Nothing to do.
     return keys;
   }
@@ -191,7 +192,7 @@ MaybeHandle<FixedArray> FilterProxyKeys(KeyAccumulator* 
accumulator,
   int store_position = 0;
   for (int i = 0; i < keys->length(); ++i) {
     Handle<Name> key(Name::cast(keys->get(i)), isolate);
-    if (key->FilterKey(filter)) continue;  // Skip this key.
+    if (key->FilterKey(filter) || (skip_indices && key->IsNumber())) 
continue;  // Skip this key.
     if (filter & ONLY_ENUMERABLE) {
       PropertyDescriptor desc;
       Maybe<bool> found =
@@ -218,7 +219,7 @@ Maybe<bool> 
KeyAccumulator::AddKeysFromJSProxy(Handle<JSProxy> proxy,
   // Postpone the enumerable check for for-in to the ForInFilter step.
   if (!is_for_in_) {
     ASSIGN_RETURN_ON_EXCEPTION_VALUE(
-        isolate_, keys, FilterProxyKeys(this, proxy, keys, filter_),
+        isolate_, keys, FilterProxyKeys(this, proxy, keys, filter_, 
skip_indices_),
         Nothing<bool>());
   }
   // 
https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys
```

but this doesn't seem to work mainly because I think I am using 
`key->IsNumber()` wrong. I am not sure what would be the correct way to 
check if the given key is indeed an index hence I ask for any guidance 
here, I understand this is a very beginner question but any help would be 
greatly appreciated.

Your Sincerely,
Debadree

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/f1342beb-194b-4192-a5d6-426bdc23e1fen%40googlegroups.com.

Reply via email to