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

[v9.x] build: make gyp user defined variables lowercase #18899

Closed
wants to merge 96 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
a62789b
src: don't abort when package.json is a directory
bnoordhuis Jan 20, 2018
e080d7d
build: do not suppress output in make doc-only
joyeecheung Feb 1, 2018
8215f67
stream: fix misleading error message
lpinca Feb 6, 2018
1072f02
benchmark: improve compare output
BridgeAR Feb 5, 2018
a5596b1
net: remove Socket.prototoype.read
addaleax Feb 4, 2018
af3841b
test: fix flaky timers-block-eventloop test
apapirovski Feb 4, 2018
a822814
test: properly tag anonymous namespaces
mhdawson Feb 5, 2018
b4d04a8
doc: fix description of createDecipheriv
tniessen Feb 8, 2018
97b5c1f
doc: add missing meta for createCipheriv
tniessen Feb 8, 2018
24d5162
doc: fix links in YAML metadata of assert.md
vsemozhetbyt Feb 9, 2018
ec1e3b2
doc: add devsnek to collaborators
devsnek Feb 9, 2018
af31f59
http2: add req and res options to server creation
Oct 5, 2017
b192190
doc: fix links to Style Guide and CPP Style Guide
justin0022 Feb 9, 2018
6340b11
src: add "icu::" prefix before ICU symbols
srl295 Feb 8, 2018
cd080ef
https: add extra options to Agent#getName()
princjef Oct 17, 2017
5ce0066
src: replace var for let / const.
estrada9166 Feb 8, 2018
f19bd9e
fs: fix stack overflow in fs.readdirSync
joyeecheung Feb 8, 2018
42f65e6
doc: add history for url.parse
styfle Feb 9, 2018
dc6c75d
doc: fix exporting a function example
Feb 8, 2018
a958121
buffer: simplify check size in assertSize
Connormiha Feb 8, 2018
d2f7468
build: no longer have v8-debug.h as dependency.
hashseed Feb 9, 2018
edcddeb
doc: add error check to fs example
evanlucas Feb 9, 2018
6790a72
test: fix flaky repl-timeout-throw
santigimeno Feb 10, 2018
b5e09c4
doc: mark NAPI_AUTO_LENGTH as code
tniessen Feb 10, 2018
cf845d4
url: simplify constructor URLSearchParams. Remove needless check null
Connormiha Feb 10, 2018
79b35fd
async_hooks: rename PromiseWrap.parentId
ofrobots Feb 8, 2018
90152eb
tools: fix eslint isRequired
BridgeAR Feb 12, 2018
5e778b4
http2: use `_final` instead of `on('finish')`
addaleax Feb 7, 2018
5e3c792
fs: make URL paths no longer experimental
jasnell Feb 6, 2018
4448eea
test: add useful info to error msg and refactor
chinhuang007 Feb 2, 2018
bd2edd7
test: fix and improve error message
kcaulfield94 Feb 1, 2018
4d90705
test: fix missing param in benchmark-timers
apapirovski Feb 12, 2018
6b0ce80
doc: add mmarchini to collaborators
Feb 12, 2018
71e84b4
path: replace "magic" numbers by readable constants
daynin Feb 8, 2018
c6525b6
test: add crypto check to test-benchmark-tls
danbev Feb 12, 2018
09cf65c
async_hooks: deprecate unsafe emit{Before,After}
ofrobots Feb 1, 2018
cc1df6d
lib: provide proper deprecation code
BridgeAR Feb 10, 2018
256940a
src: flatten ContextifyContext
devsnek Dec 9, 2017
928ecc8
vm: add modules
devsnek Jan 14, 2018
a64917b
src: factor out some common vm functions
TimothyGu Jan 13, 2018
1a0168e
vm: flip Module#link's signature
devsnek Jan 31, 2018
d1d7405
loader: fix up #18394
devsnek Feb 1, 2018
5914241
test: remove unnecessary timer
cjihrig Feb 11, 2018
e1eccc3
test: add multiline repl input regression test
cjihrig Feb 11, 2018
606a361
doc: move Fedor to TSC Emeritus
MylesBorins Feb 13, 2018
67c1811
doc: update crypo Certficate class.
antoine-amara Feb 11, 2018
30413ee
build,win: replace run-python subroutine with single find_python call
seishun Feb 7, 2018
4e66bc3
fs: replace magic numbers by named constants
daynin Feb 13, 2018
cca4062
test: add lib path env when node_shared=true
yhwang Feb 2, 2018
7bd5eb3
lib: set process.execPath on OpenBSD
qbit Feb 3, 2018
1a97840
test: update a few tests to work on OpenBSD
qbit Feb 3, 2018
4073ab1
buffer: remove obsolete NaN check
BridgeAR Feb 12, 2018
6604a2d
lib: switch to Number.isNaN
BridgeAR Feb 12, 2018
87d5741
test: wrap countdown callback in common.mustCall
Bamieh Nov 21, 2017
71dd80b
doc: remove extra space in README.md
Feb 16, 2018
5f59634
child_process: fix stdio sockets creation
santigimeno Feb 6, 2018
e0096ed
test: try to connect after server was closed
Leko Jan 19, 2018
4cb1af2
test: reduce benchmark test run time
juggernaut451 Feb 14, 2018
80e1cb7
test: make tls test more rigorous
bnoordhuis Feb 15, 2018
7bfd0c7
http: simplify checkInvalidHeaderChar
sethbrenith Jan 25, 2018
91fd98b
test: refactor of test-tls-over-http-tunnel
juggernaut451 Feb 14, 2018
de7a24c
test: refactor parallel/test-tls-addca
juggernaut451 Feb 15, 2018
b305cea
test,benchmark,doc: enable dot-notation rule
BridgeAR Feb 13, 2018
3eb31ba
doc: note that linting is required in releases.md
gibfahn Feb 14, 2018
a14186b
doc: activate `no-multiple-empty-lines` rule
BridgeAR Feb 13, 2018
983fe33
doc: warn against concurrent http2stream.respondWithFD
addaleax Feb 13, 2018
d889767
test: fix warnings in addon tests
ofrobots Feb 16, 2018
6f37c4d
test: add common.skipIfEslintMissing
MylesBorins Feb 15, 2018
1fb4cc9
test: refactor parallel/test-tls-0-dns-altname
juggernaut451 Feb 15, 2018
e071177
doc: add Yihong Wang to collaborators
yhwang Feb 16, 2018
97e7173
lib: replace `eval` with `vm.runInThisContext`
MylesBorins Feb 7, 2018
144be3d
net: simplify net.Socket#end()
addaleax Feb 11, 2018
be08ca7
path: replace duplicate conditions by functions
daynin Feb 10, 2018
13ff508
test: stdio pipe behavior tests
bzoz Feb 7, 2018
15ba093
doc: fix minor typos in GOVERNANCE.md
Trott Feb 17, 2018
7812654
test: refactor stream-*-constructor-set-methods
lpinca Feb 16, 2018
f5806c2
doc: mark accessing IPC channel fd as undefined
bzoz Dec 8, 2017
7d0c04a
doc: refactor manpage to use mdoc(7) macros
Alhadis Feb 3, 2018
e7a415d
test: refactor parallel/test-tls-pause
juggernaut451 Feb 11, 2018
36f7183
lib: allow process kill by signal number
sam-github Nov 12, 2017
1c5a430
tools: auto fix custom crypto-check eslint rule
shobhitchittora Oct 31, 2017
5111336
tools: custom eslint autofix for inspector-check.js
shobhitchittora Oct 31, 2017
bac9487
fs: remove useless comments which duplicate names of variables
daynin Feb 12, 2018
fe8cfc3
src: add nullptr check for session in DEBUG macro
danbev Feb 16, 2018
e05ecaa
tls: tls_wrap causes debug assert in vector
kfarnung Feb 17, 2018
6be701a
doc: fix typo in http2.md
vsemozhetbyt Feb 19, 2018
fe15805
doc: fix broken link in pull-requests.md
justin0022 Feb 19, 2018
88bb203
doc: improved documentation for fs.unlink()
dustinnewman Feb 18, 2018
dbd2eb9
test: http2 client operations after destroy
trivikr Feb 18, 2018
662d0cd
test: http2 client ping errors
trivikr Feb 18, 2018
bc156da
test: http2 client settings invalid callback
trivikr Feb 18, 2018
e2315ca
deps: V8: backport 76c3ac5 from upstream
ofrobots Jan 22, 2018
3cc0b7c
doc: update onboarding.md for faster exercise completion
Trott Feb 18, 2018
a40c28b
doc: fix minor grammar/typographical issues in onboarding.md
Trott Feb 18, 2018
b9b5810
doc: fix nits in tools/doc/README.md
vsemozhetbyt Feb 19, 2018
6ece376
build: make gyp user defined variables lowercase
danbev Oct 16, 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
2 changes: 2 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ rules:
accessor-pairs: error
array-callback-return: error
dot-location: [error, property]
dot-notation: error
eqeqeq: [error, smart]
no-fallthrough: error
no-global-assign: error
Expand Down Expand Up @@ -74,6 +75,7 @@ rules:
message: __defineSetter__ is deprecated.
no-return-await: error
no-self-assign: error
no-self-compare: error
no-throw-literal: error
no-unused-labels: error
no-useless-call: error
Expand Down
4 changes: 2 additions & 2 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ responsibility for the change. In the case of pull requests proposed
by an existing Collaborator, an additional Collaborator is required
for sign-off.

If one or more Collaborators oppose a proposed change, then the change can not
If one or more Collaborators oppose a proposed change, then the change cannot
be accepted unless:

* Discussions and/or additional changes result in no Collaborators objecting to
Expand Down Expand Up @@ -73,7 +73,7 @@ may request that the TSC restore them to active status.

## Technical Steering Committee

A subset of the Collaborators form the Technical Steering Committee (TSC).
A subset of the Collaborators forms the Technical Steering Committee (TSC).
The TSC has final authority over this project, including:

* Technical direction
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ doc-only: $(apidoc_dirs) $(apiassets) ## Builds the docs with the local or the
if [ ! -d doc/api/assets ]; then \
$(MAKE) tools/doc/node_modules/js-yaml/package.json; \
fi;
@$(MAKE) -s $(apidocs_html) $(apidocs_json)
@$(MAKE) $(apidocs_html) $(apidocs_json)

.PHONY: doc
doc: $(NODE_EXE) doc-only
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ For more information about the governance of the Node.js project, see
**Jeremiah Senkpiel** <[email protected]>
* [gibfahn](https://github.com/gibfahn) -
**Gibson Fahnestock** <[email protected]> (he/him)
* [indutny](https://github.com/indutny) -
**Fedor Indutny** <[email protected]>
* [jasnell](https://github.com/jasnell) -
**James M Snell** <[email protected]> (he/him)
* [joyeecheung](https://github.com/joyeecheung) -
Expand Down Expand Up @@ -277,6 +275,8 @@ For more information about the governance of the Node.js project, see
**Ben Noordhuis** <[email protected]>
* [chrisdickinson](https://github.com/chrisdickinson) -
**Chris Dickinson** <[email protected]>
* [indutny](https://github.com/indutny) -
**Fedor Indutny** <[email protected]>
* [isaacs](https://github.com/isaacs) -
**Isaac Z. Schlueter** <[email protected]>
* [joshgav](https://github.com/joshgav) -
Expand Down Expand Up @@ -340,6 +340,8 @@ For more information about the governance of the Node.js project, see
**Daniel Bevenius** <[email protected]>
* [DavidCai1993](https://github.com/DavidCai1993) -
**David Cai** <[email protected]> (he/him)
* [devsnek](https://github.com/devsnek) -
**Gus Caplan** <[email protected]> (he/him)
* [edsadr](https://github.com/edsadr) -
**Adrian Estrada** <[email protected]> (he/him)
* [eljefedelrodeodeljefe](https://github.com/eljefedelrodeodeljefe) -
Expand Down Expand Up @@ -424,6 +426,8 @@ For more information about the governance of the Node.js project, see
**Mikeal Rogers** <[email protected]>
* [misterdjules](https://github.com/misterdjules) -
**Julien Gilli** <[email protected]>
* [mmarchini](https://github.com/mmarchini) -
**Matheus Marchini** <[email protected]>
* [mscdex](https://github.com/mscdex) -
**Brian White** <[email protected]>
* [MylesBorins](https://github.com/MylesBorins) -
Expand Down Expand Up @@ -510,6 +514,8 @@ For more information about the governance of the Node.js project, see
**Jeremy Whitlock** <[email protected]>
* [XadillaX](https://github.com/XadillaX) -
**Khaidi Chu** <[email protected]> (he/him)
* [yhwang](https://github.com/yhwang) -
**Yihong Wang** <[email protected]>
* [yorkie](https://github.com/yorkie) -
**Yorkie Liu** <[email protected]>
* [yosuke-furukawa](https://github.com/yosuke-furukawa) -
Expand Down
5 changes: 3 additions & 2 deletions benchmark/compare.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const fork = require('child_process').fork;
const { fork } = require('child_process');
const { inspect } = require('util');
const path = require('path');
const CLI = require('./_cli.js');
const BenchmarkProgress = require('./_benchmark_progress.js');
Expand Down Expand Up @@ -76,7 +77,7 @@ if (showProgress) {
// Construct configuration string, " A=a, B=b, ..."
let conf = '';
for (const key of Object.keys(data.conf)) {
conf += ` ${key}=${JSON.stringify(data.conf[key])}`;
conf += ` ${key}=${inspect(data.conf[key])}`;
}
conf = conf.slice(1);
// Escape quotes (") for correct csv formatting
Expand Down
81 changes: 52 additions & 29 deletions benchmark/http/check_invalid_header_char.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,66 @@
const common = require('../common.js');
const _checkInvalidHeaderChar = require('_http_common')._checkInvalidHeaderChar;

// Put it here so the benchmark result lines will not be super long.
const LONG_AND_INVALID = 'Here is a value that is really a folded header ' +
'value\r\n this should be supported, but it is not currently';
const groupedInputs = {
// Representative set of inputs from an AcmeAir benchmark run:
// all valid strings, average length 14.4, stdev 13.0
group_acmeair: [
'W/"2-d4cbb29"', 'OK', 'Express', 'X-HTTP-Method-Override', 'Express',
'application/json', 'application/json; charset=utf-8', '206', 'OK',
'sessionid=; Path=/', 'text/html; charset=utf-8',
'text/html; charset=utf-8', '10', 'W/"a-eda64de5"', 'OK', 'Express',
'application/json', 'application/json; charset=utf-8', '2', 'W/"2-d4cbb29"',
'OK', 'Express', 'X-HTTP-Method-Override', 'sessionid=; Path=/', 'Express',
'sessionid=; Path=/,sessionid=6b059402-d62f-4e6f-b3dd-ce5b9e487c39; Path=/',
'text/html; charset=utf-8', 'text/html; charset=utf-8', '9', 'OK',
'sessionid=; Path=/', 'text/html; charset=utf-8',
'text/html; charset=utf-8', '10', 'W/"a-eda64de5"', 'OK', 'Express',
'Express', 'X-HTTP-Method-Override', 'sessionid=; Path=/',
'application/json'
],

// Put it here so the benchmark result lines will not be super long.
LONG_AND_INVALID: ['Here is a value that is really a folded header ' +
'value\r\n this should be supported, but it is not currently']
};

const inputs = [
// Valid
'',
'1',
'\t\t\t\t\t\t\t\t\t\tFoo bar baz',
'keep-alive',
'close',
'gzip',
'20091',
'private',
'text/html; charset=utf-8',
'text/plain',
'Sat, 07 May 2016 16:54:48 GMT',
'SAMEORIGIN',
'en-US',

// Invalid
'中文呢', // unicode
'foo\nbar',
'\x7F'
];

const bench = common.createBenchmark(main, {
key: [
// Valid
'',
'1',
'\t\t\t\t\t\t\t\t\t\tFoo bar baz',
'keep-alive',
'close',
'gzip',
'20091',
'private',
'text/html; charset=utf-8',
'text/plain',
'Sat, 07 May 2016 16:54:48 GMT',
'SAMEORIGIN',
'en-US',

// Invalid
'LONG_AND_INVALID',
'中文呢', // unicode
'foo\nbar',
'\x7F'
],
input: inputs.concat(Object.keys(groupedInputs)),
n: [1e6],
});

function main({ n, key }) {
if (key === 'LONG_AND_INVALID') {
key = LONG_AND_INVALID;
function main({ n, input }) {
let inputs = [input];
if (groupedInputs.hasOwnProperty(input)) {
inputs = groupedInputs[input];
}

const len = inputs.length;
bench.start();
for (var i = 0; i < n; i++) {
_checkInvalidHeaderChar(key);
_checkInvalidHeaderChar(inputs[i % len]);
}
bench.end(n);
}
2 changes: 2 additions & 0 deletions benchmark/misc/object-property-bench.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

/* eslint-disable dot-notation */

const common = require('../common.js');

const bench = common.createBenchmark(main, {
Expand Down
22 changes: 11 additions & 11 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.19',
'v8_embedder_string': '-node.20',

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
Expand All @@ -44,29 +44,29 @@

'conditions': [
['GENERATOR=="ninja"', {
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
'obj_dir': '<(PRODUCT_DIR)/obj',
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
}, {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
}],
['OS == "win"', {
'os_posix': 0,
'v8_postmortem_support%': 'false',
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/lib/v8_libbase.lib',
'obj_dir': '<(PRODUCT_DIR)/obj',
'v8_base': '<(PRODUCT_DIR)/lib/v8_libbase.lib',
}, {
'os_posix': 1,
'v8_postmortem_support%': 'true',
}],
['OS== "mac"', {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a',
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/libv8_base.a',
}],
['openssl_fips != ""', {
'OPENSSL_PRODUCT': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
}, {
'OPENSSL_PRODUCT': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
}],
['OS=="mac"', {
'clang%': 1,
Expand Down
17 changes: 12 additions & 5 deletions deps/v8/src/profiler/profiler-listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,18 @@ void ProfilerListener::RecordInliningInfo(CodeEntry* entry,
SharedFunctionInfo* shared_info = SharedFunctionInfo::cast(
deopt_input_data->LiteralArray()->get(shared_info_id));
if (!depth++) continue; // Skip the current function itself.
CodeEntry* inline_entry = new CodeEntry(
entry->tag(), GetFunctionName(shared_info->DebugName()),
CodeEntry::kEmptyNamePrefix, entry->resource_name(),
CpuProfileNode::kNoLineNumberInfo,
CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start());
const char* resource_name =
(shared_info->script()->IsScript() &&
Script::cast(shared_info->script())->name()->IsName())
? GetName(Name::cast(Script::cast(shared_info->script())->name()))
: CodeEntry::kEmptyResourceName;

CodeEntry* inline_entry =
new CodeEntry(entry->tag(), GetFunctionName(shared_info->DebugName()),
CodeEntry::kEmptyNamePrefix, resource_name,
CpuProfileNode::kNoLineNumberInfo,
CpuProfileNode::kNoColumnNumberInfo, nullptr,
code->instruction_start());
inline_entry->FillFunctionInfo(shared_info);
inline_stack.push_back(inline_entry);
}
Expand Down
79 changes: 79 additions & 0 deletions deps/v8/test/cctest/test-cpu-profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,85 @@ TEST(FunctionDetails) {
script_a->GetUnboundScript()->GetId(), 5, 14);
}

TEST(FunctionDetailsInlining) {
if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
i::FLAG_allow_natives_syntax = true;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
v8::Context::Scope context_scope(env);
ProfilerHelper helper(env);

// alpha is in a_script, beta in b_script. beta is
// inlined in alpha, but it should be attributed to b_script.

v8::Local<v8::Script> script_b = CompileWithOrigin(
"function beta(k) {\n"
" let sum = 2;\n"
" for(let i = 0; i < k; i ++) {\n"
" sum += i;\n"
" sum = sum + 'a';\n"
" }\n"
" return sum;\n"
"}\n"
"\n",
"script_b");

v8::Local<v8::Script> script_a = CompileWithOrigin(
"function alpha(p) {\n"
" let res = beta(p);\n"
" res = res + res;\n"
" return res;\n"
"}\n"
"let p = 2;\n"
"\n"
"\n"
"// Warm up before profiling or the inlining doesn't happen.\n"
"p = alpha(p);\n"
"p = alpha(p);\n"
"%OptimizeFunctionOnNextCall(alpha);\n"
"p = alpha(p);\n"
"\n"
"\n"
"startProfiling();\n"
"for(let i = 0; i < 10000; i++) {\n"
" p = alpha(p);\n"
"}\n"
"stopProfiling();\n"
"\n"
"\n",
"script_a");

script_b->Run(env).ToLocalChecked();
script_a->Run(env).ToLocalChecked();

const v8::CpuProfile* profile = i::ProfilerExtension::last_profile;
const v8::CpuProfileNode* current = profile->GetTopDownRoot();
reinterpret_cast<ProfileNode*>(const_cast<v8::CpuProfileNode*>(current))
->Print(0);
// The tree should look like this:
// 0 (root) 0 #1
// 5 (program) 0 #6
// 2 14 #2 script_a:1
// ;;; deopted at script_id: 14 position: 299 with reason 'Insufficient
// type feedback for call'.
// 1 alpha 14 #4 script_a:1
// 9 beta 13 #5 script_b:0
// 0 startProfiling 0 #3

const v8::CpuProfileNode* root = profile->GetTopDownRoot();
const v8::CpuProfileNode* script = GetChild(env, root, "");
CheckFunctionDetails(env->GetIsolate(), script, "", "script_a",
script_a->GetUnboundScript()->GetId(), 1, 1);
const v8::CpuProfileNode* alpha = FindChild(env, script, "alpha");
// Return early if profiling didn't sample alpha.
if (!alpha) return;
CheckFunctionDetails(env->GetIsolate(), alpha, "alpha", "script_a",
script_a->GetUnboundScript()->GetId(), 1, 15);
const v8::CpuProfileNode* beta = FindChild(env, alpha, "beta");
if (!beta) return;
CheckFunctionDetails(env->GetIsolate(), beta, "beta", "script_b",
script_b->GetUnboundScript()->GetId(), 0, 0);
}

TEST(DontStopOnFinishedProfileDelete) {
v8::HandleScope scope(CcTest::isolate());
Expand Down
3 changes: 3 additions & 0 deletions doc/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ rules:
no-var: error
prefer-const: error
prefer-rest-params: error

# Stylistic Issues
no-multiple-empty-lines: [error, {max: 1, maxEOF: 0, maxBOF: 0}]
8 changes: 6 additions & 2 deletions doc/api/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ changes:
description: Enumerable symbol properties are now compared.
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15036
description: NaN is now compared using the [SameValueZero][] comparison.
description: NaN is now compared using the
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
comparison.
- version: v8.5.0
pr-url: https://github.com/nodejs/node/pull/15001
description: Error names and messages are now properly compared
Expand Down Expand Up @@ -461,7 +463,9 @@ changes:
description: -0 and +0 are not considered equal anymore.
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15036
description: NaN is now compared using the [SameValueZero][] comparison.
description: NaN is now compared using the
[SameValueZero](https://tc39.github.io/ecma262/#sec-samevaluezero)
comparison.
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15001
description: Error names and messages are now properly compared
Expand Down
Loading