diff options
author | ud2 <sjx233@qq.com> | 2023-12-08 00:04:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 21:34:44 +0530 |
commit | 3f96e5a29a88afafcef0f17458b2800b2db316ee (patch) | |
tree | a39b25f88749eae6a2e6ccc8f9ee9f1dee18ef96 /ext/node/global.rs | |
parent | c1fc7b2cd511ce83566f696c8880d6718e5c6885 (diff) |
fix(ext/node): include non-enumerable keys in `Reflect.ownKeys(globalThis)` (#21485)
Closes #21484.
Diffstat (limited to 'ext/node/global.rs')
-rw-r--r-- | ext/node/global.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/node/global.rs b/ext/node/global.rs index fd2f5a7cb..994155359 100644 --- a/ext/node/global.rs +++ b/ext/node/global.rs @@ -432,9 +432,14 @@ pub fn enumerator<'s>( }; let inner = v8::Local::new(scope, inner); - let Some(array) = - inner.get_property_names(scope, GetPropertyNamesArgs::default()) - else { + let Some(array) = inner.get_property_names( + scope, + GetPropertyNamesArgs { + mode: v8::KeyCollectionMode::OwnOnly, + property_filter: v8::PropertyFilter::ALL_PROPERTIES, + ..Default::default() + }, + ) else { return; }; |