diff options
author | Kamil Ogórek <kamil.ogorek@gmail.com> | 2023-01-14 15:06:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-14 15:06:45 +0100 |
commit | 429ccff6574edc5a7052e4dbaa19075dbb844de3 (patch) | |
tree | 0b5f2f93a2694cba6c53a067aa30ba97b978fd81 /cli/tsc/99_main_compiler.js | |
parent | 1d7203c24c2ca2fa5c75a149324ebd5bf806102a (diff) |
fix(ext/flash): Correctly handle errors for chunked responses (#17303)
The leading cause of the problem was that `handleResponse` has
`tryRespondChunked` passed as an argument, which in turn is implemented
as a call to `core.ops.op_try_flash_respond_chuncked`, that throws in
the repro code.
`handleResponse` was not handled correctly, as it not returned any
value, and had no `catch` attached to it.
It also effectively was never correctly handled inside two other blocks
with `resp.then` and `PromisePrototypeCatch(PromisePrototypeThen(resp,
"..."))` as well, as it just short-circuited the promise with an empty
resolve, instead of relying on the last `(async () => {})` block.
This change makes `handleResponse` return a correct value and attach
`onError` handler to the "non-thenable" variant of response handling
code.
Diffstat (limited to 'cli/tsc/99_main_compiler.js')
0 files changed, 0 insertions, 0 deletions