• Caitlin Potter's avatar
    [async-await] remove CSA_SLOW_ASSERT in AsyncGeneratorResolve · 9867aa3f
    Caitlin Potter authored
    The assertion was intended to verify that the function is only called
    at appropriate times (at a point when it was called both by by other builtins, and by desugarings added in the parser and during bytecode generation) --- However, it didn't account for the case where
    the wrapper Promise is resolved with another JSPromise with a
    non-callable "then" method. (Step 12 of
    https://tc39.github.io/ecma262/#sec-promise-resolve-functions):
    
    "If IsCallable(thenAction) is false, then
        Return FulfillPromise(promise, resolution)."
    
    It would be observable to verify this behaviour by loading the "then"
    value and asserting that it's non-callable, so instead the CSA_ASSERT
    is just removed and replaced with a comment explaining the appropriate
    use of the function.
    
    BUG=chromium:897436, v8:5855
    R=bmeurer@chromium.org
    
    Change-Id: Ib4b11abfe3339409b57ccfda9c3f75a34e0db532
    Reviewed-on: https://chromium-review.googlesource.com/c/1296909
    Commit-Queue: Caitlin Potter <caitp@igalia.com>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#56916}
    9867aa3f
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...