-
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. |
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.
9727f0a to
bbca9a2
Compare
bbca9a2 to
614e040
Compare
|
@jasnell SetPrototypeProviderTemplate with RemovePrototype() is failing with a weird v8 error on debug mode. I'm investigating to see if there is a better solution here. |
|
For reference here's the error occuring only on debug build: |
|
Ok this a valid v8 bug. I'll open an upstream fix. |
|
Here's the fix: https://chromium-review.googlesource.com/c/v8/v8/+/7323287 |
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).