Commit f2be20b
url: reuse existing context in href setter
Correctness-wise, this removes side effects in the href setter if
parsing fails. Style-wise, this allows removing the parse() wrapper
function around C++ _parse().
Also fix an existing bug with whitespace trimming in C++ that was
previously circumvented by additionally trimming the input in
JavaScript.
Fixes: nodejs#24345
Refs: nodejs#24218 (comment)
PR-URL: nodejs#24495
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Franziska Hinkelmann <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>1 parent 639f641 commit f2be20b
File tree
3 files changed
+33
-21
lines changed- lib/internal
- src
- test/parallel
3 files changed
+33
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | 246 | | |
255 | 247 | | |
256 | 248 | | |
| |||
319 | 311 | | |
320 | 312 | | |
321 | 313 | | |
| 314 | + | |
322 | 315 | | |
323 | | - | |
| 316 | + | |
324 | 317 | | |
325 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
326 | 321 | | |
327 | 322 | | |
328 | 323 | | |
| |||
445 | 440 | | |
446 | 441 | | |
447 | 442 | | |
448 | | - | |
| 443 | + | |
| 444 | + | |
449 | 445 | | |
450 | 446 | | |
451 | 447 | | |
| |||
491 | 487 | | |
492 | 488 | | |
493 | 489 | | |
494 | | - | |
495 | | - | |
| 490 | + | |
| 491 | + | |
496 | 492 | | |
497 | 493 | | |
498 | 494 | | |
| |||
555 | 551 | | |
556 | 552 | | |
557 | 553 | | |
558 | | - | |
| 554 | + | |
559 | 555 | | |
560 | 556 | | |
561 | 557 | | |
| |||
572 | 568 | | |
573 | 569 | | |
574 | 570 | | |
575 | | - | |
| 571 | + | |
576 | 572 | | |
577 | 573 | | |
578 | 574 | | |
| |||
592 | 588 | | |
593 | 589 | | |
594 | 590 | | |
595 | | - | |
| 591 | + | |
596 | 592 | | |
597 | 593 | | |
598 | 594 | | |
| |||
611 | 607 | | |
612 | 608 | | |
613 | 609 | | |
614 | | - | |
615 | | - | |
| 610 | + | |
| 611 | + | |
616 | 612 | | |
617 | 613 | | |
618 | 614 | | |
| |||
635 | 631 | | |
636 | 632 | | |
637 | 633 | | |
638 | | - | |
| 634 | + | |
639 | 635 | | |
640 | 636 | | |
641 | 637 | | |
| |||
669 | 665 | | |
670 | 666 | | |
671 | 667 | | |
672 | | - | |
| 668 | + | |
673 | 669 | | |
674 | 670 | | |
675 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
| 1379 | + | |
1379 | 1380 | | |
1380 | 1381 | | |
1381 | 1382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments