This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Commit 8cf3916
[Backport 5.5.x] fix: Fix Chrome stack overflow during highlighting (#64074)
Using the spread operator with large arrays can trigger a
stack overflow in Chrome/V8.
In a highlighting context, we can have 10k-100k occurrences
in a file, so let's avoid using the spread operator.
Fixes https://linear.app/sourcegraph/issue/GRAPH-772
## Test plan
Manually tested against sample file.

## Changelog
- Fixes a Chrome-specific stack overflow when highlighting large files.
<br> Backport 2644e24 from #64072
Co-authored-by: Varun Gandhi <varun.gandhi@sourcegraph.com>1 parent 72ab1f8 commit 8cf3916
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
0 commit comments