* V8 does not optimize functions with try-catch blocks, so we isolate them here * to minimize the damage (Note: no longer true as of V8 5.4 -- but still will * not be inlined). * @param {string} s * @param {(v: string) => string} decoder * @returns {string}
(s, decoder)
| 476 | * @returns {string} |
| 477 | */ |
| 478 | function decodeStr(s, decoder) { |
| 479 | try { |
| 480 | return decoder(s); |
| 481 | } catch { |
| 482 | return QueryString.unescape(s, true); |
| 483 | } |
| 484 | } |