Commit a4ade04
authored
fix(performanceTimer): throwing in axe catch clause (#4852)
I ran into a problem with this:
https://github.com/dequelabs/axe-core/blob/e7dae4ec48cbfef74de9f833fdcfb178c1002985/lib/core/base/rule.js#L297-L300
If the end mark isn't set, performance.measure throws an error. Since we
call performance.measure in the catch, it is quite possible that the end
mark doesn't exist. And then throwing from a catch completely throws the
run. I don't think axe should fail if the performance measure fails, so
instead I'm going to have it just log the error and move forward.1 parent e7dae4e commit a4ade04
File tree
2 files changed
+23
-1
lines changed- lib/core/utils
- test/core/utils
2 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
84 | 102 | | |
85 | 103 | | |
86 | 104 | | |
| |||
0 commit comments