-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
url: fix definitions of URL
/SearchParams
methods and accessors
#36799
url: fix definitions of URL
/SearchParams
methods and accessors
#36799
Conversation
Would you kindly split this into several commits to help with code review please? GitHub UI isn't really helping to follow the moving parts here 😅 |
076b097
to
335ae15
Compare
@ExE-Boss This needs a rebase. If you have the time to split it into several commits (E.G.: one for |
@aduh95 I have split this into a move (0a49b9e) and edit (609a6eb?w=1) commit. |
335ae15
to
23386ce
Compare
Nit: upstreaming the tests to the wpt repo, so other implementers can use them, would be ideal. |
@ExE-Boss this needs a rebase. |
23386ce
to
609a6eb
Compare
There are some major perf improvements and also a few regressions for the legacy API for some reason:
WHATWG results look OK, I'm going to spawn another benchmark CI to see if the perf change on legacy API were just a flakiness. Full benchmark results
|
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/941/ EDIT: it got similar results 🤷♂️
|
I’m guessing that’s because V8 is able to better optimise classes when the methods are defined in the class declaration, rather than using |
cc @nodejs/url |
OK but do you understand how does this affect the legacy API? |
PR-URL: nodejs#36799 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
This fixes getter and setter names for the WHATWG URL classes, and fixes a few other inconsistencies with browsers implementations. Co-authored-by: Gerhard Stöbich <deb2001-github@yahoo.de> PR-URL: nodejs#36799 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
609a6eb
to
0dfc0f5
Compare
Landed in 7d5806e...0dfc0f5 |
PR-URL: #36799 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
This fixes getter and setter names for the WHATWG URL classes, and fixes a few other inconsistencies with browsers implementations. Co-authored-by: Gerhard Stöbich <deb2001-github@yahoo.de> PR-URL: #36799 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
This ensures that:
and that:
The changes to
URLSearchParams
were done to fix the[[HomeObject]]
internal slot so that it points to theURLSearchParams.prototype
object, rather than the object that’s passed todefineIDLClass
.Best reviewed with the “Hide whitespace changes” flag enabled: #36799?w=1