• Leszek Swirski's avatar
    [offthread] Add an OffThreadIsolate · 7a20b6b9
    Leszek Swirski authored
    The Factory/OffThreadFactory allows us to cleanly separate object
    construction behaviour between main-thread and off-thread in a
    syntactically consistent way (so that methods templated on the factory
    type can be made to work on both).
    
    However, there are cases where we also have to access the Isolate, for
    handle creation or exception throwing. So far we have been pushing more
    and more "customization points" into the factories to allow these
    factory-templated methods to dispatch on this isolate behaviour via
    these factory methods. Unfortunately, this is an increasing layering
    violation between Factory and Isolate, particularly around exception
    handling.
    
    Now, we introduce an OffThreadIsolate, analogous to Isolate in the same
    way as OffThreadFactory is analogous to Factory. All methods which were
    templated on Factory are now templated on Isolate, and methods which
    used to take an Isolate, and which were recently changed to take a
    templated Factory, are changed/reverted to take a templated Isolate.
    OffThreadFactory gets an isolate() method to match Factory's.
    
    Notably, FactoryHandle is changed to "HandleFor", where the template
    argument can be either of the Isolate type or the Factory type (allowing
    us to dispatch on both depending on what is available).
    
    Bug: chromium:1011762
    Change-Id: Id144176f7da534dd76f3d535ab2ade008b6845e3
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030909
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#66101}
    7a20b6b9
Name
Last commit
Last update
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...
.flake8 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...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS 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...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...