url: fix definitions of URL/SearchParams methods and accessors#36799
url: fix definitions of URL/SearchParams methods and accessors#36799aduh95 merged 2 commits intonodejs:masterfrom
URL/SearchParams methods and accessors#36799Conversation
|
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 🤷♂️ Details |
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 <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
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 <[email protected]> PR-URL: nodejs#36799 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
609a6eb to
0dfc0f5
Compare
|
Landed in 7d5806e...0dfc0f5 |
PR-URL: #36799 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
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 <[email protected]> PR-URL: #36799 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
This ensures that:
and that:
The changes to
URLSearchParamswere done to fix the[[HomeObject]]internal slot so that it points to theURLSearchParams.prototypeobject, rather than the object that’s passed todefineIDLClass.Best reviewed with the “Hide whitespace changes” flag enabled: #36799?w=1