-
Notifications
You must be signed in to change notification settings - Fork 28.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vm,src: add property query interceptors #53517
Conversation
Distinguish named property and indexed property when enumerating keys and handle query interceptions. Co-Authored-By: Michaël Zasso <targos@protonmail.com>
09b0f0f
to
38c543d
Compare
|
||
Local<Array> properties; | ||
|
||
if (!ctx->sandbox()->GetPropertyNames(context).ToLocal(&properties)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we just use the variant of GetPropertyNames with a property filter that skips strings and symbols + KeyConversionMode::kKeepNumbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PropertyFilter::SKIP_STRINGS
would filter both strings including indices. It is the counter argument to PropertyFilter::SKIP_SYMBOLS
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, maybe just PropertyFilter::SKIP_SYMBOLS and KeyConversionMode::kKeepNumbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed unnecessary type conversion in dd8c0c6.
@joyeecheung would you mind taking a look again? thanks! |
Landed in 2b068ff...c0962dc |
src: remove unused ContextifyContext::WeakCallback
ContextifyContext::WeakCallback
is unused.vm,src: add property query interceptors
Distinguish named property and indexed property when enumerating keys
and handle query interceptions.
Co-Authored-By: Michaël Zasso targos@protonmail.com
Fixes: #52720
Re-landing #53172
/cc @nodejs/vm