-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(webidl): do not throw if Object.prototype
has been mutated
#16407
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for the PR.
I'm concerned about the cost of ObjectDefineProperty
, it's much slower than simple assignment in V8 (example #16315). This will slowdown all WebAPIs that use createDictionaryConverter
.
Can we measure the performance of this PR vs |
@littledivy please take a look, can we get this PR to green? |
main:
This patch:
Here, |
Maybe it would be better to change |
db77509
to
075af2b
Compare
I've rebased and made the change to using null-prototype object as suggested. From the results on the experiments with it on Node.js, it's indeed probably the fastest way around, and thankfully it looks like all the tests are passing. |
Seems to be a conflict caused by #17648 |
Main:
This branch:
Still apparently slower but maybe not as much? |
|
Signed-off-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
main
this branch
|
Adds a test that ensures that "weird" value for the
FilePropertyBag
options parameter are handled as in the browsers (I tested on Firefox, Safari, and Chromium), and fixes a bug that made Deno throw with:Code that I used to test on the browser
Same as in the PR, but in JS rather than TS: