Commit 037c2d0
committed
[Refactor] Harden against pathological function names
Change the regular expression for matching the function
name to avoid potential quadratic runtime of the
implementation of `Function.prototype.name` due to the
regular expression in `es6-sham.js:157`.
I'm not aware of any input that would trigger such
behavior, however the fix in this case is trivial. In
fact, both the leading `\s` and trailing `\s` in the
regular expression are unnecessary (though, based on
context, I would say the leading `\s` is actually
necessary, however it currently isn't so...).1 parent 0265dc4 commit 037c2d0
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments