Commit ddee6b9
committed
Fix URL constructor on udp:// urls in Chrome App environment
For: brave/brave-browser#5604
`bittorrent-tracker` is broken when run in a Chrome App environment.
The issue is that the `URL` constructor is buggy Chromium. https://bugs.chromium.org/p/chromium/issues/detail?id=734880
We switched to `URL` from `require('url')` in `[email protected]`. Commit: webtorrent@93b4139
This code path was not exercised by `bittorrent-tracker`'s tests because UDP trackers are normally only used in a Node.js environment. Braves run the code in a Chrome extension environment which we don't test.1 parent 91148ce commit ddee6b9
1 file changed
+18
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
75 | 91 | | |
76 | 92 | | |
77 | 93 | | |
| |||
204 | 220 | | |
205 | 221 | | |
206 | 222 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 223 | + | |
211 | 224 | | |
212 | 225 | | |
213 | 226 | | |
| |||
0 commit comments