Repository navigation
Commit 9f3ed74
fix(context): skip source scan for classes without a base class
describeInjectedArguments reads the class source and runs regular
expressions to decide whether constructor injections are inherited.
This also runs for a class with no base class, where nothing can be
inherited, so applications that inspect many classes pay for it at
startup.
Check for a base class first and scan only when one exists. A class can
be linked to a base class only through its prototype, and
Reflect.getMetadata follows that link, so the check covers this case too.
Results stay the same for such classes.
Fixes #11878
Signed-off-by: zuhairkhalid229 <zuhairkhalid229@gmail.com>1 parent 6615311 commit 9f3ed74
2 files changed
Lines changed: 58 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
108 | 151 | | |
109 | 152 | | |
110 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
503 | 517 | | |
504 | 518 | | |
505 | 519 | | |
| |||
589 | 603 | | |
590 | 604 | | |
591 | 605 | | |
592 | | - | |
| 606 | + | |
593 | 607 | | |
594 | 608 | | |
595 | 609 | | |
| |||
0 commit comments