Commit 380dfe4
src: removed unnecessary prototypes from Environment::SetProtoMethod
Added an optional parameter of type v8::ConstructorBehavior to
Environment::NewFunctionTemplate, defaulting to
v8::ConstructorBehavior::kAllow. Also modified
Environment::SetProtoMethod to pass
v8::ConstructorBehavior::kThrow to its
call to Environment::NewFunctionTemplate.
Fixes: #17668
Refs: #20321
PR-URL: #20321
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent d55f90d commit 380dfe4Copy full SHA for 380dfe4
File tree
Expand file treeCollapse file tree
3 files changed
+27
-4
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
3 files changed
+27
-4
lines changedOpen diff view settings
Collapse file
+6-3Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
583 | 583 | |
584 | 584 | |
585 | 585 | |
586 | | - |
| 586 | + |
| 587 | + |
587 | 588 | |
588 | | - |
| 589 | + |
| 590 | + |
589 | 591 | |
590 | 592 | |
591 | 593 | |
| ||
605 | 607 | |
606 | 608 | |
607 | 609 | |
608 | | - |
| 610 | + |
| 611 | + |
609 | 612 | |
610 | 613 | |
611 | 614 | |
|
Collapse file
+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
687 | 687 | |
688 | 688 | |
689 | 689 | |
690 | | - |
| 690 | + |
| 691 | + |
| 692 | + |
691 | 693 | |
692 | 694 | |
693 | 695 | |
|
Collapse file
test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js
Copy file name to clipboard+18Lines changed: 18 additions & 0 deletions
| 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 | + |
| 16 | + |
| 17 | + |
| 18 | + |
0 commit comments