Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v8.7.0 proposal #15762

Merged
merged 209 commits into from
Oct 11, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
d67fb81
deps: update V8 to 6.1.534.36
targos Sep 13, 2017
21004dd
deps: limit regress/regress-crbug-514081 v8 test
mhdawson May 9, 2016
63ebad5
deps: fix addons compilation with VS2013
bzoz May 23, 2017
ede9d2e
deps: cherry-pick f19b889 from upstream V8
targos Aug 16, 2017
2601a51
deps: backport 6e9e2e5 from upstream V8
Aug 3, 2017
19a5021
deps: backport bca8409 from upstream V8
Aug 3, 2017
d85283b
deps: backport f9c4b7a from upstream V8
Aug 3, 2017
273822f
deps: cherry-pick e020aae394 from V8 upstream
bnoordhuis Aug 17, 2017
9934dfe
deps: cherry-pick 1aead19 from upstream V8
bnoordhuis Aug 17, 2017
c0b5b09
deps: add postmortem metadata for V8 TurboFan
targos Sep 6, 2017
2e8652e
src: fix SmartOS compilation
targos Jun 27, 2017
8471747
deps: patch V8 to 6.1.534.38
MylesBorins Sep 15, 2017
aa1a3ea
deps: revert ABI breaking changes in V8 6.1
addaleax Sep 14, 2017
e1828eb
deps: cherry-pick b6158eb6befae from V8 upstream
addaleax Sep 8, 2017
b4ad15b
deps: cherry-pick 9b21865822243 from V8 upstream
addaleax Sep 8, 2017
e8da556
src: keep track of env properly in node_perf.cc
addaleax Sep 4, 2017
902feea
src: use InstantiateModule instead of deprecated
danbev Sep 15, 2017
d202c05
src: remove unused static variable
bnoordhuis Sep 18, 2017
aded597
src: handle uv_async_init() failure
bnoordhuis Sep 18, 2017
e72761a
src: return references from getters, not copies
bnoordhuis Sep 18, 2017
fd1a892
src: constify PerformanceEntry data members
bnoordhuis Sep 18, 2017
34b4180
url: change variable name to be more descriptive
jason9693 Sep 22, 2017
9eeaab4
crypto: only try to set FIPS mode if different
gibfahn Apr 4, 2017
6720539
src: move node_trace_writer/buffer.h to agent.cc
danbev Sep 23, 2017
e0a7634
doc: update table of contents for common/README.md
Trott Sep 25, 2017
1bc0c1f
async_hooks: consistent internal naming
AndreasMadsen Sep 26, 2017
44ea525
src: clear async id stack if bootstrap throws
trevnorris Sep 22, 2017
81515c7
build: add test-with-async-hooks
trevnorris Jun 20, 2017
98fc665
test: print resource stack on error
trevnorris Jun 16, 2017
bbdd93f
test: skip test when checking async_hooks
trevnorris Jun 20, 2017
09b3fae
async_wrap: add constructor for PromiseWrap
trevnorris Jun 14, 2017
9da8346
async_wrap: allow user to pass execution_async_id
trevnorris Jun 14, 2017
9fcf5d7
src: remove unused computation
cjihrig Sep 24, 2017
69f8738
src: remove unused variable in node_url.cc
cjihrig Sep 24, 2017
0aea258
test: fix http-writable-true-after-close flakyness
mcollina Sep 21, 2017
d1d2ca5
doc: retire bnoordhuis from the TSC
bnoordhuis Sep 26, 2017
22b2d1a
doc: fix mistake in http2stream.respondWithFile.
antoine-amara Sep 18, 2017
a43f681
src,etw: fix event 9 on 64 bit Windows
joaocgreis Sep 22, 2017
9c1e48d
http: client keep-alive for UNIX domain sockets
bengl May 25, 2017
7dd0ca4
build: run es-module tests in CI
Sep 14, 2017
ed8c89a
build: fix shared installing target
yorkie Sep 2, 2017
93d5ead
crypto: use SSL_SESSION_get_id
davidben Sep 11, 2017
be4e809
crypto: use X509V3_EXT_d2i
davidben Sep 11, 2017
6565dda
doc: add callback function signatures in fs.md
matejkrajcovic Jun 2, 2017
ec56cbe
doc: improve fs.utimes
refack Jul 10, 2017
1ed0c77
crypto: better crypto error messages
gla5001 Aug 10, 2017
97c0880
deps: update V8 to 6.1.534.42
targos Sep 21, 2017
ca02576
src: fix typo in probe description
evanlucas Sep 13, 2017
eebb2d7
tools, build: refactor macOS installer
jpwesselink Sep 4, 2017
25fd85d
src: add help for NODE_PENDING_DEPRECATION env
tomc974 Sep 25, 2017
6a01918
deps: cherry-pick 0353a1e from upstream V8
targos Sep 25, 2017
db70874
doc: add bmeurer to collaborators
bmeurer Sep 29, 2017
1141e93
doc: update libuv license
TimothyGu Sep 28, 2017
7e1003a
src: remove unused using in node_trace_writer.h
danbev Sep 26, 2017
1cc4245
url: fix remaining calculation
rmisev Sep 27, 2017
de52eb8
perf_hooks: remove docs for unimplemented API
sam-github Sep 27, 2017
f8805c4
doc: fix link in the test/README.md
rmisev Sep 27, 2017
e365814
dgram: support for setting socket buffer size
DamienOReilly Jun 11, 2017
6551bb3
src: fix compiler warning in udp_wrap.cc
danbev Sep 14, 2017
e5b5a03
doc: do not begin yaml value with backtick
maclover7 Sep 17, 2017
64d0c74
src: use UV_EINVAL instead of EINVAL in udp_wrap
danbev Sep 17, 2017
827f843
dgram: refactor SO_RCVBUF and SO_SNDBUF methods
cjihrig Sep 20, 2017
9c247c5
doc: standardize function param/object prop style
gibfahn Jun 18, 2017
3f2ea53
deps: update npm to 5.4.2
targos Sep 20, 2017
5f469a2
n-api: add check for large strings
mhdawson Sep 25, 2017
f8e93e8
doc: fix links in some intra-repository docs
vsemozhetbyt Sep 29, 2017
965efd7
src: remove unused includes in src/tracing
danbev Sep 29, 2017
bd7b216
test: fix test-https-writable-true-after-close
Trott Oct 1, 2017
803d5bb
test: update es-module.status prefix
jackhorton Sep 29, 2017
a4a5bee
http2: adjust error emit in core, add tests
apapirovski Sep 30, 2017
4153938
test: http2Stream redundant shutdown and single cb
trivikr Sep 25, 2017
d181147
url: const-ify APIs, and pass URL by ref
sam-github Sep 25, 2017
f68f572
tty: require readline at top of file
bengl Sep 28, 2017
1c0ae10
deps: V8: cherry-pick 163d360 from upstream
ofrobots Sep 28, 2017
3d6390b
stream: fix todo
BridgeAR Sep 28, 2017
cc90283
doc: edit COLLABORATORS_GUIDE.md for readability
Trott Sep 26, 2017
7842f63
test: Http2Stream destroy server before shutdown
trivikr Sep 25, 2017
ae91ffe
stream: fix disparity between buffer and the count
jlvivero Sep 28, 2017
df271f4
http2: setting shuttingDown=true after validation
trivikr Sep 29, 2017
db0ba97
doc: update fs.utimes{,Sync} changelog
lpinca Sep 29, 2017
88f69d3
test: check that this != new.target in addon
bnoordhuis Sep 29, 2017
5630c8c
doc: add missing TOC entry in CONTRIBUTING.md
vsemozhetbyt Oct 2, 2017
1506384
src: fix windows-only build breakage
bnoordhuis Oct 2, 2017
fcea265
doc: fix v8.6 changelog entry
BridgeAR Oct 1, 2017
cf579ea
doc: fix dead link in doc/releases.md
lpinca Oct 2, 2017
54a43a6
doc: change encoding to decoding
thefourtheye Oct 1, 2017
978f78e
doc: alphabetize TSC Emeriti in README.md
Trott Oct 2, 2017
979e38b
doc: add 'git clean -xfd' to backport guide
lance Oct 1, 2017
dcad2df
doc: fix typo in tls.md
koh110 Oct 2, 2017
1582260
test: increase test coverage for os.js
viktor-ku Jul 6, 2017
86ee05d
http2: simplify TypeName
jasnell Sep 29, 2017
078ee27
http2: refactor method arguments to avoid bools
jasnell Sep 29, 2017
68cd233
http2: eliminate dead code
jasnell Sep 29, 2017
86dfcc6
http2: making sending to the socket more efficient
jasnell Sep 29, 2017
16bdbb9
async_hooks: fix reference in code comment
mscdex Oct 3, 2017
d2e1545
util: deprecate obj.inspect for custom inspection
Trott Sep 26, 2017
c17ff62
deps: cherry-pick f4a2b7f3 from V8 upstream.
erinishimoticha Oct 2, 2017
af304b2
test: mark test-bindings and test-debug-end flaky
joaocgreis Oct 3, 2017
a814a55
fs: add O_DSYNC
Sep 15, 2017
6003afc
doc,test: minor improvements to O_DSYNC
tniessen Sep 22, 2017
58c68c2
util: use faster -0 check
mscdex Oct 2, 2017
995948a
test: skip test if host is too slow
Trott Sep 29, 2017
df1d988
doc: explain common.restore* functions
Trott Oct 2, 2017
3f12109
test: refactor test-internal-errors
Trott Oct 2, 2017
22ea3a8
test: remove `common.PORT` from test-tlswrap
Trott Oct 2, 2017
1e79a06
test: fix flaky async-hooks/test-tlswrap
Trott Oct 2, 2017
0004214
src: trace_event macro line continuation cleanup
danbev Oct 3, 2017
3d2481e
build: call setlocal in vcbuild.bat
danbev Oct 2, 2017
77bdfc9
deps: upgrade libuv to 1.15.0
cjihrig Oct 2, 2017
344d613
doc: fix YAML syntax in fs.md
lpinca Oct 4, 2017
824b8df
src: remove unused node_dtrace.h from node_win32
danbev Oct 4, 2017
10622c6
http2: near full http1 compatibility, add tests
apapirovski Oct 3, 2017
0ae84c2
doc: fix incorrect vm.createContext usage
tshemsedinov Oct 7, 2017
7475541
doc: fix: correctly use `public key` instead of `private key`
pomerantsev Oct 6, 2017
acd4924
doc: fix http2 API docs typos
sericaia Oct 5, 2017
6642f54
src: fix ^ in stack trace with vm's columnOffset
TimothyGu Oct 4, 2017
bd49ada
test: http2 stored settings returned when present
trivikr Oct 3, 2017
21a8a82
test: add common.fixtures to https-req-split
Oct 6, 2017
f39c792
test: http2 client destroy tests in one file
trivikr Oct 3, 2017
4716921
test: use fixtures.readKey in https-agent test
Greg-GB Oct 6, 2017
e1a1d2e
test: replace common.fixturesDir in test-exception
keywordnew Oct 6, 2017
516fda6
test: update 'fixturesDir' refs in a test file
JamesMGreene Oct 6, 2017
c47ebe2
test: replace fixturesDir with common.fixtures
ParidelPooya Oct 6, 2017
b766d27
test: replace fixturesDir with common.fixtures
pauljohnberry Oct 6, 2017
8ea9648
test: update fixturesDir to fixtures.readKey
bnb Oct 6, 2017
1d7e1c0
test: remove messages in assert.strictEqual
Saeed-Navarik Oct 6, 2017
7ca02b0
test: replace fixturesDir with common.fixtures
rachelnicole Oct 6, 2017
9f6d535
doc: update style guide for markdown extension
Trott Oct 5, 2017
de198a9
test: update test to use fixtures module
gbugaisky Oct 6, 2017
73a41cf
test: replace common.fixturesDir with fixtures.
codeviking Oct 6, 2017
67cef9b
build: allow build with system python 3
forivall Oct 6, 2017
73231d9
test: replace common.fixturesDir with readKey
AshleyRayMaceli Oct 6, 2017
4594315
test: replace fixturesDir with fixtures.readKey
Oct 6, 2017
9592a48
test: use fixtures.path for cmd string building
FNJ5 Oct 6, 2017
145d1db
test: replaced common.fixturesDir with readKey
Oct 6, 2017
d410f74
test: use common.fixtures in checkServerIdentity
forivall Oct 6, 2017
054f8f6
test: replace fixturesDir in tls-env-bad-extra-ca
aniwng Oct 6, 2017
e9d31bc
test: replaced common.fixturesDir with readKey
letthewookieewin Oct 6, 2017
4a9e331
test: alter assert.strictEqual to default message
gishmel Oct 6, 2017
530b62f
test: more informative test failure messages
alec-ferguson-ck Oct 6, 2017
75ab6c0
test: use common.fixtures module in test-preload
lzcabrera Oct 6, 2017
ab046be
test: replacing assert message with template
Oct 6, 2017
adceca4
test: improve assert messages
ericljpemberton Oct 6, 2017
d1bb608
test: replaced fixturesDir with common.fixtures
jopann Oct 6, 2017
ece6cd1
test: replace fixturesDir with fixtures module
BinarySo1o Oct 6, 2017
b564fe2
test: use defaultHistoryPath instead of path.join
chrisbudy Oct 6, 2017
44719ed
doc: add clearer setup description
craftninja Oct 6, 2017
a224760
test: upgrade from fixturesDir to fixtures.path
madeinjam Oct 6, 2017
3fd4f62
test: replace literal with template string
brantphoto Oct 6, 2017
94c6296
tools: use template literals
sarahmeyer Oct 6, 2017
ba9aa46
test: removed string from assert message arg
dpaulino Oct 6, 2017
9059b09
test: remove template literal
emilyford Oct 6, 2017
3063152
test: remove common.fixturesDir
delaguilaluis Oct 6, 2017
e12dc40
test: replace fixturesDir with fixtures
mujz Oct 6, 2017
ca5f4f0
tools: use more template literals
PierluigiIannarelli Oct 6, 2017
26536e4
test: changes to use template literal
joanne-jjb Oct 6, 2017
7df8e0b
test: replace common.fixturesDir with fixture
Panguino Oct 6, 2017
5b29e5a
test: modify test messages to template literals
atsui-tc Oct 6, 2017
dd23140
test: replace fixturesDir with fixtures module
Blackth0rn Oct 6, 2017
633772a
test: refactor test to use the fixtures module
stropitek Oct 6, 2017
84dd578
test: remove literal error messages
fyesoft Oct 6, 2017
0286da0
test: replaced fixturesDir with fixtures module
mckalexee Oct 6, 2017
768060d
test: changed buffer-zero output
garlicbrie Oct 6, 2017
205927f
test: display better error message for assertion
SgtPooki Oct 6, 2017
e7c55bf
test: replaced literals in errors with templates
domrein Oct 6, 2017
d3272c4
test: use common.fixtures module
cjchoi Oct 6, 2017
7d8a808
test: replaced fixturesDir with fixtures module
mckalexee Oct 6, 2017
66a2c71
doc: fix macosx-firewall suggestion BUILDING
Suraiya-Hameed Oct 6, 2017
5bfc4f5
test: replace fixtureDir with fixtures module
ctdio Oct 6, 2017
2ea339a
test: use fixtures module instead of common
wonk Oct 6, 2017
27e0532
test: added string_decoder.js a parallel test
uttampawar Oct 6, 2017
a14b447
test: improve an error message
pomerantsev Oct 6, 2017
906f2b1
test: remove message from asserts
justin0022 Oct 6, 2017
f201edc
test: replace fixturesDir with fixtures module
penDerGraft Oct 6, 2017
c5c51eb
test: improve asset msg in test
genewoo Oct 6, 2017
802f99b
test: change concatenation to template literal
nodexpertsdev Oct 6, 2017
2d25a3b
test: replace string concatenation with template
robtpaton Oct 6, 2017
181d4bf
test: add NODE_UNIQUE_ID value to err message
danielelisi Oct 6, 2017
9f9bd38
test: replace error msg w/ template literal
sashimii Oct 6, 2017
329d22f
test: use common.fixtures in tls test
Oct 6, 2017
3b682aa
test: assert.strictEqual using template literals
jmcgui05 Oct 9, 2017
a625d82
test: updated error message
craftninja Oct 6, 2017
547c284
test: replace string concatenation with templates
cleong-tc Oct 6, 2017
ccecaca
test: replaced fixturesDir with fixtures module
mckalexee Oct 6, 2017
dba620b
test: changed fixtures require
creisle Oct 6, 2017
bbbf58e
test: change fixturesDir to fixtures.path
saviogl Oct 6, 2017
36a0d3f
test: cleanup test-buffer-sharedarraybuffer
RafLeszczynski Oct 6, 2017
f7ab126
test: replace fixturesDir with fixtures module
Oct 6, 2017
6a44442
test: use fixtures.readKey
Oct 6, 2017
6e25b08
test: clarify assertion failure
Oct 6, 2017
387b0b8
test: replace concat with template literals
GitHubTracey Oct 6, 2017
e4f0483
test: replace fixturesDir with fixtures module
PyMedic Oct 6, 2017
f849655
test: use fixtures module
moe-dizzle Oct 6, 2017
e9f6a62
test: include expected result in error messages
keywordnew Oct 6, 2017
5d63c10
test: create benchmark test for misc and module
CharlesWall Oct 6, 2017
0e707f3
tools: replace concat with template literals
Oct 6, 2017
140c98b
doc: document the benchmark CI
joyeecheung Oct 8, 2017
d1266a3
doc: mention collaboration summit in onboarding.md
joyeecheung Oct 8, 2017
8f367bb
test: fix race condition in addon test
kkwoker Oct 6, 2017
e4c461b
src: replace manual memory mgmt with std::string
bnoordhuis Oct 5, 2017
d962ee3
test: use common.fixtures module for file path
adilio Oct 6, 2017
bae46dc
doc: add kfarnung to collaborators
kfarnung Oct 9, 2017
572492a
test: clarify assert messages in crypto tests
cpandrews8 Oct 6, 2017
e48c8b3
test: replace fixtureDir with fixtures.path
matthewreed26 Oct 6, 2017
50cae5c
test: remove assert message
johenry Oct 6, 2017
b1e6373
test: replaces fixturesDir with fixtures
Oct 6, 2017
ab7448e
tools: replace concatenation with string templates
Ethan-Arrowood Oct 6, 2017
6f42b68
test: replace common.fixturesDir w/ fixtures.path
Druotic Oct 6, 2017
dc4f1b9
2017-10-11, Node.js Version 8.7.0 (Current)
MylesBorins Oct 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: revert ABI breaking changes in V8 6.1
Below is the list of changes:

    deps: revert 70de12b73c150 from upstream V8

    Original commit message:

        Remove deprecated ForceSet

        Also move the soon-to-be-deprecated version to deprecated

        BUG=none
        R=ulan@chromium.org

        Change-Id: I2252404f63e25ac35c7798daf66b36144bef6a7e
        Reviewed-on: https://chromium-review.googlesource.com/518162
        Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
        Commit-Queue: Jochen Eisinger <jochen@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#45554}

    [squash] use renamed internal utilities

    v8: reorder V8_INTRINSICS_LIST for ABI compat

    Make `kErrorPrototype` added at the end of the `Intrinsic` for
    ABI compatibility.

    deps: revert 0089c786ed882 from V8 upstream

    Original commit message:

        Merged: Squashed multiple commits.

        Merged: [heap] Add API to set heap semi-space limits in KB.
        Revision: bb29f9a4d6fb5e32

        Merged: [heap] Partially reland "Allow a minimum semi-space size of 512K."
        Revision: 7486dc3331

        Merged: [heap] Set initial semi-space size to 512K.
        Revision: a5230d81d1f73c

        BUG=chromium:716032,chromium:735649
        LOG=N
        NOTRY=true
        NOPRESUBMIT=true
        NOTREECHECKS=true
        R=hablich@chromium.org

        Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
        Change-Id: Ia9946e28ce41dee6199fac571274aa196576385b
        Reviewed-on: https://chromium-review.googlesource.com/616283
        Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
        Cr-Commit-Position: refs/branch-heads/6.1@{#47}
        Cr-Branched-From: 1bf2e10ddb194d4c2871a87a4732613419de892d-refs/heads/6.1.534@{#1}
        Cr-Branched-From: e825c4318eb2065ffdf9044aa6a5278635c36427-refs/heads/master@{#46746}

    v8: work around callback typedef renaming

    Do some clever tricks to have an easy way around
    V8 renaming one of its typedef to a deprecated version and then
    introducing a new typedef with the same name.

    deps: revert 5ebd6fcd269de from V8 upstream

    Original commit message:

        [heap] Lower external allocation limit when external memory shrinks.

        BUG=chromium:728228
        CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

        Review-Url: https://codereview.chromium.org/2921883002
        Cr-Commit-Position: refs/heads/master@{#45726}

    deps: revert cf8f7bdc9d5ee from V8 upstream

    Original commit message:

        [heap] Increase memory reducer activation limit for external memory changes.

        BUG=chromium:729521
        CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

        Review-Url: https://codereview.chromium.org/2923563006
        Cr-Commit-Position: refs/heads/master@{#45763}

    deps: revert 11fc9fab94d48 from V8 upstream

    Original commit message:

        [heap] Guard against re-entering GC on external memory change.

        TBR=hpayer@chromium.org
        BUG=chromium:729868,chromium:729521
        CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

        Review-Url: https://codereview.chromium.org/2929463002
        Cr-Commit-Position: refs/heads/master@{#45745}

    deps: revert 502c6ae6a0397 from V8 upstream

    Original commit message:

        [heap] Activate memory reducer on external memory activity.

        BUG=chromium:728228,chromium:626082
        CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

        Review-Url: https://codereview.chromium.org/2917853004
        Cr-Commit-Position: refs/heads/master@{#45671}

    v8: revert changes to Contents structs

    The feature is disabled by default anyway,but we disable it completely.

Backport-PR-URL: #15393
PR-URL: #15393
Author: Anna Henningsen <anna@addaleax.net>
Author: Peter Marshall <p.s.marshall0@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
addaleax authored and MylesBorins committed Oct 3, 2017
commit aa1a3ea998e895b57f69abd6b6c483b7cd1819fe
127 changes: 36 additions & 91 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -3097,9 +3097,12 @@ class V8_EXPORT Object : public Value {
//
// Note also that this only works for named properties.
V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
Local<Value> value,
PropertyAttribute attribs = None));
bool ForceSet(Local<Value> key, Local<Value> value,
PropertyAttribute attribs = None));
V8_DEPRECATE_SOON("Use CreateDataProperty / DefineOwnProperty",
Maybe<bool> ForceSet(Local<Context> context,
Local<Value> key, Local<Value> value,
PropertyAttribute attribs = None));

V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
Expand Down Expand Up @@ -4292,28 +4295,14 @@ class V8_EXPORT ArrayBuffer : public Object {
*/
class V8_EXPORT Contents { // NOLINT
public:
Contents()
: data_(nullptr),
byte_length_(0),
allocation_base_(nullptr),
allocation_length_(0),
allocation_mode_(Allocator::AllocationMode::kNormal) {}

void* AllocationBase() const { return allocation_base_; }
size_t AllocationLength() const { return allocation_length_; }
Allocator::AllocationMode AllocationMode() const {
return allocation_mode_;
}
Contents() : data_(NULL), byte_length_(0) {}

void* Data() const { return data_; }
size_t ByteLength() const { return byte_length_; }

private:
void* data_;
size_t byte_length_;
void* allocation_base_;
size_t allocation_length_;
Allocator::AllocationMode allocation_mode_;

friend class ArrayBuffer;
};
Expand Down Expand Up @@ -4662,28 +4651,14 @@ class V8_EXPORT SharedArrayBuffer : public Object {
*/
class V8_EXPORT Contents { // NOLINT
public:
Contents()
: data_(nullptr),
byte_length_(0),
allocation_base_(nullptr),
allocation_length_(0),
allocation_mode_(ArrayBuffer::Allocator::AllocationMode::kNormal) {}

void* AllocationBase() const { return allocation_base_; }
size_t AllocationLength() const { return allocation_length_; }
ArrayBuffer::Allocator::AllocationMode AllocationMode() const {
return allocation_mode_;
}
Contents() : data_(NULL), byte_length_(0) {}

void* Data() const { return data_; }
size_t ByteLength() const { return byte_length_; }

private:
void* data_;
size_t byte_length_;
void* allocation_base_;
size_t allocation_length_;
ArrayBuffer::Allocator::AllocationMode allocation_mode_;

friend class SharedArrayBuffer;
};
Expand Down Expand Up @@ -4930,8 +4905,8 @@ class V8_EXPORT External : public Value {
F(ArrayProto_forEach, array_for_each_iterator) \
F(ArrayProto_keys, array_keys_iterator) \
F(ArrayProto_values, array_values_iterator) \
F(IteratorPrototype, initial_iterator_prototype) \
F(ErrorPrototype, initial_error_prototype) \
F(IteratorPrototype, initial_iterator_prototype)

enum Intrinsic {
#define V8_DECL_INTRINSIC(name, iname) k##name,
Expand Down Expand Up @@ -5995,8 +5970,6 @@ V8_INLINE Local<Boolean> False(Isolate* isolate);
*
* The arguments for set_max_semi_space_size, set_max_old_space_size,
* set_max_executable_size, set_code_range_size specify limits in MB.
*
* The argument for set_max_semi_space_size_in_kb is in KB.
*/
class V8_EXPORT ResourceConstraints {
public:
Expand All @@ -6014,28 +5987,10 @@ class V8_EXPORT ResourceConstraints {
void ConfigureDefaults(uint64_t physical_memory,
uint64_t virtual_memory_limit);

// Returns the max semi-space size in MB.
V8_DEPRECATE_SOON("Use max_semi_space_size_in_kb()",
int max_semi_space_size()) {
return static_cast<int>(max_semi_space_size_in_kb_ / 1024);
}

// Sets the max semi-space size in MB.
V8_DEPRECATE_SOON("Use set_max_semi_space_size_in_kb(size_t limit_in_kb)",
void set_max_semi_space_size(int limit_in_mb)) {
max_semi_space_size_in_kb_ = limit_in_mb * 1024;
int max_semi_space_size() const { return max_semi_space_size_; }
void set_max_semi_space_size(int limit_in_mb) {
max_semi_space_size_ = limit_in_mb;
}

// Returns the max semi-space size in KB.
size_t max_semi_space_size_in_kb() const {
return max_semi_space_size_in_kb_;
}

// Sets the max semi-space size in KB.
void set_max_semi_space_size_in_kb(size_t limit_in_kb) {
max_semi_space_size_in_kb_ = limit_in_kb;
}

int max_old_space_size() const { return max_old_space_size_; }
void set_max_old_space_size(int limit_in_mb) {
max_old_space_size_ = limit_in_mb;
Expand All @@ -6061,10 +6016,7 @@ class V8_EXPORT ResourceConstraints {
}

private:
// max_semi_space_size_ is in KB
size_t max_semi_space_size_in_kb_;

// The remaining limits are in MB
int max_semi_space_size_;
int max_old_space_size_;
int max_executable_size_;
uint32_t* stack_limit_;
Expand Down Expand Up @@ -6293,8 +6245,22 @@ typedef void (*FailedAccessCheckCallback)(Local<Object> target,
*/
typedef bool (*DeprecatedAllowCodeGenerationFromStringsCallback)(
Local<Context> context);
typedef bool (*AllowCodeGenerationFromStringsCallback)(Local<Context> context,
Local<String> source);
// The naming of this alias is for **Node v8.x releases only**
// plain V8 >= 6.1 just calls it AllowCodeGenerationFromStringsCallback
typedef bool (*FreshNewAllowCodeGenerationFromStringsCallback)(
Local<Context> context, Local<String> source);

// a) no addon uses this anyway
// b) this is sufficient because c++ type mangling takes care of resolving
// the typedefs
// c) doing it this way allows people to use the Fresh New variant
#ifdef USING_V8_SHARED
typedef DeprecatedAllowCodeGenerationFromStringsCallback
AllowCodeGenerationFromStringsCallback;
#else
typedef FreshNewAllowCodeGenerationFromStringsCallback
AllowCodeGenerationFromStringsCallback;
#endif

// --- WebAssembly compilation callbacks ---
typedef bool (*ExtensionCallback)(const FunctionCallbackInfo<Value>&);
Expand Down Expand Up @@ -7570,7 +7536,7 @@ class V8_EXPORT Isolate {
* strings should be allowed.
*/
void SetAllowCodeGenerationFromStringsCallback(
AllowCodeGenerationFromStringsCallback callback);
FreshNewAllowCodeGenerationFromStringsCallback callback);
V8_DEPRECATED("Use callback with source parameter.",
void SetAllowCodeGenerationFromStringsCallback(
DeprecatedAllowCodeGenerationFromStringsCallback callback));
Expand Down Expand Up @@ -7691,7 +7657,6 @@ class V8_EXPORT Isolate {
friend class PersistentValueMapBase;

void ReportExternalAllocationLimitReached();
void CheckMemoryPressure();
};

class V8_EXPORT StartupData {
Expand Down Expand Up @@ -8052,7 +8017,7 @@ class V8_EXPORT V8 {
*/
static void ShutdownPlatform();

#if V8_OS_POSIX
#if V8_OS_LINUX && V8_TARGET_ARCH_X64 && !V8_OS_ANDROID
/**
* Give the V8 signal handler a chance to handle a fault.
*
Expand All @@ -8073,7 +8038,7 @@ class V8_EXPORT V8 {
* points to a ucontext_t structure.
*/
static bool TryHandleSignal(int signal_number, void* info, void* context);
#endif // V8_OS_POSIX
#endif // V8_OS_LINUX && V8_TARGET_ARCH_X64 && !V8_OS_ANDROID

/**
* Enable the default signal handler rather than using one provided by the
Expand Down Expand Up @@ -8941,8 +8906,6 @@ class Internals {
static const int kExternalMemoryOffset = 4 * kApiPointerSize;
static const int kExternalMemoryLimitOffset =
kExternalMemoryOffset + kApiInt64Size;
static const int kExternalMemoryAtLastMarkCompactOffset =
kExternalMemoryLimitOffset + kApiInt64Size;
static const int kIsolateRootsOffset = kExternalMemoryLimitOffset +
kApiInt64Size + kApiInt64Size +
kApiPointerSize + kApiPointerSize;
Expand Down Expand Up @@ -10161,32 +10124,13 @@ uint32_t Isolate::GetNumberOfDataSlots() {
int64_t Isolate::AdjustAmountOfExternalAllocatedMemory(
int64_t change_in_bytes) {
typedef internal::Internals I;
const int64_t kMemoryReducerActivationLimit = 32 * 1024 * 1024;
int64_t* external_memory = reinterpret_cast<int64_t*>(
reinterpret_cast<uint8_t*>(this) + I::kExternalMemoryOffset);
int64_t* external_memory_limit = reinterpret_cast<int64_t*>(
const int64_t external_memory_limit = *reinterpret_cast<int64_t*>(
reinterpret_cast<uint8_t*>(this) + I::kExternalMemoryLimitOffset);
int64_t* external_memory_at_last_mc =
reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(this) +
I::kExternalMemoryAtLastMarkCompactOffset);
const int64_t amount = *external_memory + change_in_bytes;

*external_memory = amount;

int64_t allocation_diff_since_last_mc =
*external_memory_at_last_mc - *external_memory;
allocation_diff_since_last_mc = allocation_diff_since_last_mc < 0
? -allocation_diff_since_last_mc
: allocation_diff_since_last_mc;
if (allocation_diff_since_last_mc > kMemoryReducerActivationLimit) {
CheckMemoryPressure();
}

if (change_in_bytes < 0) {
*external_memory_limit += change_in_bytes;
}

if (change_in_bytes > 0 && amount > *external_memory_limit) {
if (change_in_bytes > 0 && amount > external_memory_limit) {
ReportExternalAllocationLimitReached();
}
return *external_memory;
Expand Down Expand Up @@ -10220,7 +10164,8 @@ void V8::SetAllowCodeGenerationFromStringsCallback(
DeprecatedAllowCodeGenerationFromStringsCallback callback) {
Isolate* isolate = Isolate::GetCurrent();
isolate->SetAllowCodeGenerationFromStringsCallback(
reinterpret_cast<AllowCodeGenerationFromStringsCallback>(callback));
reinterpret_cast<FreshNewAllowCodeGenerationFromStringsCallback>(
callback));
}


Expand Down
51 changes: 24 additions & 27 deletions deps/v8/src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -878,16 +878,16 @@ Extension::Extension(const char* name,
}

ResourceConstraints::ResourceConstraints()
: max_semi_space_size_in_kb_(0),
: max_semi_space_size_(0),
max_old_space_size_(0),
stack_limit_(NULL),
code_range_size_(0),
max_zone_pool_size_(0) {}

void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
uint64_t virtual_memory_limit) {
set_max_semi_space_size_in_kb(
i::Heap::ComputeMaxSemiSpaceSize(physical_memory));
set_max_semi_space_size(
static_cast<int>(i::Heap::ComputeMaxSemiSpaceSize(physical_memory)));
set_max_old_space_size(
static_cast<int>(i::Heap::ComputeMaxOldGenerationSize(physical_memory)));
set_max_zone_pool_size(i::AccountingAllocator::kMaxPoolSize);
Expand All @@ -903,7 +903,7 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,

void SetResourceConstraints(i::Isolate* isolate,
const ResourceConstraints& constraints) {
size_t semi_space_size = constraints.max_semi_space_size_in_kb();
int semi_space_size = constraints.max_semi_space_size();
int old_space_size = constraints.max_old_space_size();
size_t code_range_size = constraints.code_range_size();
size_t max_pool_size = constraints.max_zone_pool_size();
Expand Down Expand Up @@ -4505,6 +4505,24 @@ Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context> context,
}


bool v8::Object::ForceSet(v8::Local<Value> key, v8::Local<Value> value,
v8::PropertyAttribute attribs) {
i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
ENTER_V8_HELPER_DO_NOT_USE(isolate, Local<Context>(), Object, ForceSet,
false, i::HandleScope, false);
i::Handle<i::JSObject> self =
i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
has_pending_exception =
DefineObjectProperty(self, key_obj, value_obj,
static_cast<i::PropertyAttributes>(attribs))
.is_null();
EXCEPTION_BAILOUT_CHECK_SCOPED_DO_NOT_USE(isolate, false);
return true;
}


Maybe<bool> v8::Object::SetPrivate(Local<Context> context, Local<Private> key,
Local<Value> value) {
auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
Expand Down Expand Up @@ -6331,16 +6349,11 @@ bool v8::V8::Initialize() {
return true;
}

#if V8_OS_POSIX
bool V8::TryHandleSignal(int signum, void* info, void* context) {
#if V8_OS_LINUX && V8_TARGET_ARCH_X64 && !V8_OS_ANDROID
return v8::internal::trap_handler::TryHandleSignal(
signum, static_cast<siginfo_t*>(info), static_cast<ucontext_t*>(context));
#else // V8_OS_LINUX && V8_TARGET_ARCH_X64 && !V8_OS_ANDROID
bool V8::TryHandleSignal(int signum, void* info, void* context) {
return false;
#endif
}
#endif
#endif // V8_OS_LINUX && V8_TARGET_ARCH_X64 && !V8_OS_ANDROID

bool V8::RegisterDefaultSignalHandler() {
return v8::internal::trap_handler::RegisterDefaultSignalHandler();
Expand Down Expand Up @@ -7882,11 +7895,6 @@ v8::ArrayBuffer::Contents v8::ArrayBuffer::GetContents() {
i::Handle<i::JSArrayBuffer> self = Utils::OpenHandle(this);
size_t byte_length = static_cast<size_t>(self->byte_length()->Number());
Contents contents;
contents.allocation_base_ = self->allocation_base();
contents.allocation_length_ = self->allocation_length();
contents.allocation_mode_ = self->has_guard_region()
? Allocator::AllocationMode::kReservation
: Allocator::AllocationMode::kNormal;
contents.data_ = self->backing_store();
contents.byte_length_ = byte_length;
return contents;
Expand Down Expand Up @@ -8095,12 +8103,6 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::GetContents() {
Contents contents;
contents.data_ = self->backing_store();
contents.byte_length_ = byte_length;
// SharedArrayBuffers never have guard regions, so their allocation and data
// are equivalent.
contents.allocation_base_ = self->backing_store();
contents.allocation_length_ = byte_length;
contents.allocation_mode_ =
ArrayBufferAllocator::Allocator::AllocationMode::kNormal;
return contents;
}

Expand Down Expand Up @@ -8257,11 +8259,6 @@ void Isolate::ReportExternalAllocationLimitReached() {
heap->ReportExternalMemoryPressure();
}

void Isolate::CheckMemoryPressure() {
i::Heap* heap = reinterpret_cast<i::Isolate*>(this)->heap();
if (heap->gc_state() != i::Heap::NOT_IN_GC) return;
heap->CheckMemoryPressure();
}

HeapProfiler* Isolate::GetHeapProfiler() {
i::HeapProfiler* heap_profiler =
Expand Down
Loading