• Andreas Haas's avatar
    [d8] Seal HandleScope and reset Context before running a v8::Task · 78f26103
    Andreas Haas authored
    V8 does not require the embedder to open a HandleScope before executing
    a v8::Task. However, d8 does open such a HandleScope. Because of that
    HandleScope we repeatedly found missing HandleScopes only in Chrome
    tests and not in d8 tests. The same is true for the context, which is
    not set when Chrome calls a v8::Task.
    
    With this CL we create a SealHandleScope around the execution of a
    v8::Task, and we set the context to nullptr, so that d8 matches Chrome
    better.
    
    Ideally d8 would not open a HandleScope in the first place, and would
    not set a context. Both make d8 behave different than Chrome and thereby
    may hide bugs from our testing infrastructure. However, the
    implementation of the InspectorClient requires them. I think the
    SealHandleScope and resetting the context is a good workaround at the
    moment. Yang, do you know if we can get rid of the context there in the
    long run?
    
    R=yangguo@chromium.org
    
    Change-Id: I8df0fabde7dfdcdc630d20af4c68f141ac3a454c
    Reviewed-on: https://chromium-review.googlesource.com/1177742Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#55644}
    78f26103
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...
.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...