-
Notifications
You must be signed in to change notification settings - Fork 496
use null prototype for opaque wrappers #5747
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
base: main
Are you sure you want to change the base?
Conversation
|
An alternative way of doing this that might be better, is to add the following when the This would avoid the added branch and after-creation prototype mutation in the hotpath and allows the wpt's to pass. I haven't benchmarked to see if it actually is faster tho but it's worth an experiment. |
|
@jasnell I believe you're right and I think it is actually faster than the current state. |
8487bfc to
e9e8876
Compare
e9e8876 to
23ac30e
Compare
jasnell
left a comment
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.
LGTM. I do think it might be beneficial for either the PR or commit message to explain a bit about WHY this fixes the tests as it's non-obvious, but that's not necessarily blocking.
This is important for passing several web-platform tests related to streams and fetch.
We use null prototype to prevent Object.prototype.then patches from intercepting internal promise operations (required for WPT compliance).