f781f522af
Add an enum argument to DateTimeConfigurationChangeNotification to control whether or not to redetect the host time zone. The default value kSkip doesn't cause redetecting so that callers do not need to change if they want the current behavior (e.g. Chromium). Note that the host time zone detection does not work when v8 is run inside a sandbox as in Chromium so that Chromium detects the host time zone outside the sandbox before calling DateTimeConfigurationChangeNotification. OTOH, other v8 embedders may find it more convenient for v8 to do the host time zone detection on their behalf. In that case, they can call the function with the new argument set to value kRedetect. Test: With PHP+V8Js on linux, execute: php -r ' putenv("TZ=Europe/Helsinki"); $v8 = new V8Js(); $v8->executeString("print((new Date(0)).toString()+\"\\n\");"); putenv("TZ=America/New_York"); $v8->executeString("print((new Date(0)).toString()+\"\\n\");");' Result before modification: Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time) Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time) Result after modification: Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time) Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time) Result after V8JS is modified to use value kRedetect when calling Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time) Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time) DateTimeConfigurationChangeNotification: Change-Id: I005192dd42669a94f606a49baa9eafad3475b9fd Reviewed-on: https://chromium-review.googlesource.com/c/1449637 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jungshik Shin <jshin@chromium.org> Commit-Queue: Jungshik Shin <jshin@chromium.org> Cr-Commit-Position: refs/heads/master@{#59613} |
||
---|---|---|
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://github.com/v8/v8/wiki
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 on the V8 wiki.