• Hai Dang's avatar
    Add iterator protectors for JSMapIterator/JSSet/JSSetIterator. · 60d3ce72
    Hai Dang authored
    The MapIterator protector protects the original iteration behaviors of
    Map.prototype.keys(), Map.prototype.values(), and Set.prototype.entries().
    It does not protect the original iteration behavior of
    Map.prototype[Symbol.iterator](). The protector is invalidated when:
    * The 'next' property is set on an object where the property holder is the
      %MapIteratorPrototype% (e.g. because the object is that very prototype).
    * The 'Symbol.iterator' property is set on an object where the property
      holder is the %IteratorPrototype%. Note that this also invalidates the
      SetIterator protector (see below).
    
    The SetIterator protector protects the original iteration behavior of
    Set.prototype.keys(), Set.prototype.values(), Set.prototype.entries(),
    and Set.prototype[Symbol.iterator](). The protector is invalidated when:
    * The 'next' property is set on an object where the property holder is the
      %SetIteratorPrototype% (e.g. because the object is that very prototype).
    * The 'Symbol.iterator' property is set on an object where the property
      holder is the %SetPrototype% OR %IteratorPrototype%. This means that
      setting Symbol.iterator on a MapIterator object can also invalidate the
      SetIterator protector, and vice versa, setting Symbol.iterator on a
      SetIterator object can also invalidate the MapIterator. This is an over-
      approximation for the sake of simplicity.
    
    Bug: v8:7980
    Change-Id: I54ad6e4c7f19ccc27d7001f6c4b6c8d6ea4ee871
    Reviewed-on: https://chromium-review.googlesource.com/c/1273102Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Hai Dang <dhai@google.com>
    Cr-Commit-Position: refs/heads/master@{#56530}
    60d3ce72
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...