Uh oh!
There was an error while loading. Please reload this page.
url: improve isURLThis detection - #46866
Conversation
nodejs-github-bot
commented
Feb 27, 2023
Review requested:
|
lemire
commented
Feb 27, 2023
@anonrig Is that faster? |
anonrig
commented
Feb 27, 2023
I don't think so. This was a recommendation by @TimothyGu on the original Ada migration pull request. I'm following up with the TODOs |
nodejs-github-bot
commented
Feb 27, 2023
I wonder if we are just going to do a brand check, why can't we just make |
anonrig
commented
Feb 28, 2023
I didn't follow. Can you share an example? |
aduh95
commented
Feb 28, 2023
classURL{
#context;gethref(){this.#context;}}Object.getOwnPropertyDescriptor(URL.prototype,'href').get.call('not a URL object');// TypeError |
anonrig
commented
Mar 1, 2023
I'll follow up on a different pull request since it might be a breaking change. |
nodejs-github-bot
commented
Mar 1, 2023
Landed in 37c736f |
PR-URL: #46866 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
PR-URL: #46866 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
PR-URL: #46866 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
victordidenko
commented
Apr 22, 2023
Oh. In the original comment from @TimothyGu there was
Can you please elaborate, why that so? |
In nodejs 18.16.0 become impossible to do a trick `Object.create(new URL(...))`, so rewrote all mocks implementations to classes. Nodejs behaviour was changed in this PR - nodejs/node#46866
TimothyGu
commented
Jul 5, 2023
@victordidenko If you try running |
victordidenko
commented
Jul 5, 2023
@TimothyGu Thank you! Yes, I know that already :) |
lemire
commented
Jul 5, 2023
lemire
commented
Jul 5, 2023
anonrig
commented
Jul 5, 2023
I think I see what the issue is... |
victordidenko
commented
Jul 5, 2023
victordidenko
commented
Jul 5, 2023
I totally agree with that URL should behave the same in all environments. I was just using this feature in my tests, and was really surprised, that node update from 18.15 to 18.16 broke my tests. But I've already rewrote them, and for now I'm just curious, why this behaviour in the first place? |




Resolve the TODO and updates the implementation to avoid prototype look.
cc @TimothyGu