978f41a1da
The bug would occur when we try to Reset() to a position already at the end. This happens e.g., when the regexp ends with \u. What used to happen in that case: 1) Advance past \ and u (to the end) (which wouldn't increase next_pos_ enough) 2) Try to parse 4 hex digits 3) When that failed, Reset() to the position which should've been at the end but wasn't. To be able to properly Reset() to a position at the end, we need to allow next_pos_ to move beyond the end (since position() is next_pos_ - 1). Minimal repro case: var r = /foo\u/ r.test("foou") // should be true, was false. (Note that \u not followed by 4 hex didits should be interpreted as an identity escape. It already worked unless \u was at the end of the regexp.) BUG=v8:3756 LOG=NO Review URL: https://codereview.chromium.org/802313003 Cr-Commit-Position: refs/heads/master@{#25838} |
||
---|---|---|
benchmarks | ||
build | ||
include | ||
samples | ||
src | ||
test | ||
testing | ||
tools | ||
.clang-format | ||
.gitignore | ||
AUTHORS | ||
BUILD.gn | ||
ChangeLog | ||
codereview.settings | ||
DEPS | ||
LICENSE | ||
LICENSE.strongtalk | ||
LICENSE.v8 | ||
LICENSE.valgrind | ||
Makefile | ||
Makefile.android | ||
Makefile.nacl | ||
OWNERS | ||
PRESUBMIT.py | ||
README.md | ||
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://code.google.com/p/v8/
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/*