diff options
author | Linus Groh <mail@linusgroh.de> | 2021-07-05 13:10:04 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-07-05 14:14:54 +0100 |
commit | 073071c634ab27ab3c2ec16237d4e1fd018f662e (patch) | |
tree | eea26e5eb38f8b9dd9bdd4ff4e65013fc9ac293c /Ports/lua | |
parent | fe9dc473204d79e868dbc28c70976be3a9d3a64b (diff) | |
download | serenity-073071c634ab27ab3c2ec16237d4e1fd018f662e.zip |
LibJS: Fix Promise constructor reject function argument
If calling the executor function throws an exception, the return value
of `vm.call()` will be an empty value, which we then passed as an
argument to the reject function, which is incorrect - what it actually
needs is the exception value. This stems from a misunderstanding of the
spec I had at the time of implementing this - in their case, the
exception value is part of the completion record returned by Call().
This error was previously masked as we would use a fallback
(`value_or(js_undefined())` for the empty value argument, but that was
removed in 57f7e6e.
Fixes #8447.
Diffstat (limited to 'Ports/lua')
0 files changed, 0 insertions, 0 deletions