Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 8fd7c3e

Browse files
chakrabotjackhorton
authored andcommitted
Merge nodejs/master
Merge 896eaf6 as of 2017-10-29. This is an automatically created merge. For any problems please contact @kunalspathak.
2 parents b48c11f + 896eaf6 commit 8fd7c3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+814
-259
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ notes about [commit squashing](#commit-squashing)).
309309
A good commit message should describe what changed and why.
310310

311311
1. The first line should:
312-
- contain a short description of the change
313-
- be 50 characters or less
312+
- contain a short description of the change (preferably 50 characters or less,
313+
and no more than 72 characters)
314314
- be entirely in lowercase with the exception of proper nouns, acronyms, and
315315
the words that refer to code, like function/variable names
316316
- be prefixed with the name of the changed subsystem and start with an

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,26 @@ test: all
213213
$(MAKE) build-addons
214214
$(MAKE) build-addons-napi
215215
$(MAKE) doc-only
216+
$(MAKE) lint
216217
$(MAKE) cctest
217218
$(PYTHON) tools/test.py --mode=release --flaky-tests=$(FLAKY_TESTS) -J \
218219
$(CI_ASYNC_HOOKS) \
219220
$(CI_JS_SUITES) \
220221
$(CI_NATIVE_SUITES) \
221222
doctool known_issues
222-
$(MAKE) lint
223223
endif
224224

225+
# For a quick test, does not run linter or build doc
226+
test-only: all
227+
$(MAKE) build-addons
228+
$(MAKE) build-addons-napi
229+
$(MAKE) cctest
230+
$(PYTHON) tools/test.py --mode=release -J \
231+
$(CI_ASYNC_HOOKS) \
232+
$(CI_JS_SUITES) \
233+
$(CI_NATIVE_SUITES) \
234+
known_issues
235+
225236
test-cov: all
226237
$(MAKE) build-addons
227238
$(MAKE) build-addons-napi
@@ -1107,6 +1118,7 @@ endif
11071118
test-gc \
11081119
test-gc-clean \
11091120
test-hash-seed \
1121+
test-only \
11101122
test-v8 \
11111123
test-v8-all \
11121124
test-v8-benchmarks \

benchmark/util/format.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ const bench = common.createBenchmark(main, {
2121
});
2222

2323
function main({ n, type }) {
24+
// For testing, if supplied with an empty type, default to string.
25+
type = type || 'string';
26+
2427
const [first, second] = inputs[type];
2528

2629
bench.start();

benchmark/util/inspect-array.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ function main({ n, len, type }) {
1818
var arr = Array(len);
1919
var i, opts;
2020

21+
// For testing, if supplied with an empty type, default to denseArray.
22+
type = type || 'denseArray';
23+
2124
switch (type) {
2225
case 'denseArray_showHidden':
2326
opts = { showHidden: true };

benchmark/util/type-check.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ const bench = common.createBenchmark(main, {
2929
type: Object.keys(args),
3030
version: ['native', 'js'],
3131
argument: ['true', 'false-primitive', 'false-object'],
32-
millions: ['5']
32+
n: [5e6]
3333
}, {
3434
flags: ['--expose-internals']
3535
});
3636

3737
function main(conf) {
38+
// For testing, if supplied with an empty type, default to ArrayBufferView.
39+
conf.type = conf.type || 'ArrayBufferView';
40+
3841
const util = process.binding('util');
3942
const types = require('internal/util/types');
4043

41-
const n = (+conf.millions * 1e6) | 0;
44+
const n = (+conf.n) | 0;
4245
const func = { native: util, js: types }[conf.version][`is${conf.type}`];
4346
const arg = args[conf.type][conf.argument];
4447

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# Reset this number to 0 on major V8 upgrades.
3131
# Increment by one for each non-official patch applied to deps/v8.
32-
'v8_embedder_string': '-node.7',
32+
'v8_embedder_string': '-node.8',
3333

3434
# Enable disassembler for `--print-code` v8 options
3535
'v8_enable_disassembler': 1,

deps/v8/include/v8-inspector.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ class V8_EXPORT V8InspectorClient {
211211
// TODO(dgozman): this was added to support service worker shadow page. We
212212
// should not connect at all.
213213
virtual bool canExecuteScripts(int contextGroupId) { return true; }
214+
215+
virtual void maxAsyncCallStackDepthChanged(int depth) {}
214216
};
215217

216218
class V8_EXPORT V8Inspector {

deps/v8/src/inspector/v8-debugger.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,8 @@ void V8Debugger::setAsyncCallStackDepth(V8DebuggerAgentImpl* agent, int depth) {
726726
if (m_maxAsyncCallStackDepth == maxAsyncCallStackDepth) return;
727727
// TODO(dgozman): ideally, this should be per context group.
728728
m_maxAsyncCallStackDepth = maxAsyncCallStackDepth;
729+
m_inspector->client()->maxAsyncCallStackDepthChanged(
730+
m_maxAsyncCallStackDepth);
729731
if (!maxAsyncCallStackDepth) allAsyncTasksCanceled();
730732
}
731733

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Tests for max async call stack depth changed.
2+
maxAsyncCallStackDepthChanged: 8
3+
maxAsyncCallStackDepthChanged: 0
4+
maxAsyncCallStackDepthChanged: 8
5+
maxAsyncCallStackDepthChanged: 0
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2017 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
let {session, contextGroup, Protocol} =
6+
InspectorTest.start('Tests for max async call stack depth changed.');
7+
8+
(async function test(){
9+
utils.setLogMaxAsyncCallStackDepthChanged(true);
10+
await Protocol.Debugger.enable();
11+
await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8});
12+
await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 0});
13+
await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8});
14+
await Protocol.Debugger.disable();
15+
InspectorTest.completeTest();
16+
})();

0 commit comments

Comments
 (0)