b9962a9a96
The TryGetOwnProperty code supports only unique names that are not array indices. Unfortunately, this is neither obvious from its type, nor from its comment, nor from its code. ProxiesCodeStubAssembler::CheckHasTrapResult violated the assumption and was already fixed a few days ago. This CL fixes CheckGetSetTrapResult and improves our code documentation in the form of comments and assertions. Concretely: - Add CodeStubAssembler::IsUniqueName and IsUniqueNameNoIndex - Use IsUniqueNameNoIndex in CheckGetSetTrapResult to guard TryGetOwnProperty (bailout to runtime if not satisfied). - Similarly, use IsUniqueNameNoIndex to simplify the previous fix in CheckHasTrapResult. - Add a IsUniqueNameNoIndex CSA_ASSERT to TryGetOwnProperty and a few other places to avoid such bugs in the future. - Add a IsUniqueName CSA_ASSERT to a few places where we apparently expect unique names (I don't know if those allow indices or not). - Add a DCHECK to Name::IsUniqueName to ensure and document that this shortcut version is equivalent to HeapObject::IsUniqueName. Bug: chromium:937618 Change-Id: Id4a18ab2a0e9c7591b087dd0c9fe018aa9b9ef3a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1514732 Auto-Submit: Georg Neis <neis@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#60196} |
||
---|---|---|
benchmarks | ||
build_overrides | ||
custom_deps | ||
docs | ||
gni | ||
include | ||
infra | ||
samples | ||
src | ||
test | ||
testing | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gn | ||
.vpython | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
BUILD.gn | ||
ChangeLog | ||
CODE_OF_CONDUCT.md | ||
codereview.settings | ||
DEPS | ||
LICENSE | ||
LICENSE.fdlibm | ||
LICENSE.strongtalk | ||
LICENSE.v8 | ||
LICENSE.valgrind | ||
OWNERS | ||
PRESUBMIT.py | ||
README.md | ||
snapshot_toolchain.gni | ||
WATCHLISTS |
V8 JavaScript Engine
V8 is Google's open source JavaScript engine.
V8 implements ECMAScript as specified in ECMA-262.
V8 is written in C++ and is used in Google Chrome, the open source browser from Google.
V8 can run standalone, or can be embedded into any C++ application.
V8 Project page: https://v8.dev/docs
Getting the Code
Checkout depot tools, and run
fetch v8
This will checkout V8 into the directory v8
and fetch all of its dependencies.
To stay up to date, run
git pull origin
gclient sync
For fetching all branches, add the following into your remote
configuration in .git/config
:
fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
fetch = +refs/tags/*:refs/tags/*
Contributing
Please follow the instructions mentioned at v8.dev/docs/contribute.