• dcheng's avatar
    Propagate exceptions thrown by access check interceptors. · ebe94192
    dcheng authored
    When v8 fails an access check, it invokes a helper to try to see if it
    can service the request via an access check interceptor. Invoking the
    access check interceptor can throw an exception (e.g. a SecurityError).
    
    Unfortunately, the failed access check property helpers and the
    interceptor helpers don't agree on how to propagate the exception: if
    the interceptor helper detects a scheduled exception, it promotes the
    exception to a pending exception and returns to the failed access check
    property helper.
    
    The failed access check property helper also has an early return in
    case of a scheduled exception. However, this doesn't work, as the
    previously thrown exception is no longer scheduled, as it's been
    promoted to a pending exception. Thus, the failed access check property
    helper always end up calling the failed access check callback as well.
    Since Blink's implementation of the failed access check callback also
    throws an exception, this conflicts with the previously-thrown,
    already-pending exception.
    
    With this patch, the failed access check property helpers check for a
    pending exception rather than a scheduled exception after invoking the
    interceptor, so the exception can be propagated correctly.
    
    BUG=v8:5715
    R=yangguo@chromium.org,jochen@chromium.org
    
    Review-Url: https://codereview.chromium.org/2550423002
    Cr-Commit-Position: refs/heads/master@{#41556}
    ebe94192
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles 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...
.gitignore Loading commit data...
.gn 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...
Makefile Loading commit data...
Makefile.android 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...