• Andreas Haas's avatar
    [d8] Run the message loop in the same RealmScope as the script · 1016e625
    Andreas Haas authored
    In d8 a script is executed in a RealmScope. However, all micro task
    which are created by the script are not executed within the RealmScope
    at the moment. With this CL I move the execution of the micro task into
    the RealmScope.
    
    I thought about creating a new RealmScope for the micro tasks, but
    (1) It did not fix the crashing repro;
    (2) It seems wrong that the micro tasks are executed in a different
        realm than the script;
    
    Therefore I just moved the execution of the micro tasks into the
    RealmScope of the script.
    
    Thereby I moved the execution tasks also into the Context::Scope of the
    script. The problem is that the Context::Scope surrounds the RealmScope,
    and when I to open the RealmScope before the Context::Scope, not even
    the execution of the script works anymore.
    
    R=yangguo@chromium.org
    
    Bug: chromium:797846
    Change-Id: If152af282beec8f0b0564dcc9682fee8588e142c
    Reviewed-on: https://chromium-review.googlesource.com/856497Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#50442}
    1016e625
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...
.editorconfig Loading commit data...
.git-blame-ignore-revs 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...
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...