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

v7.1.0 proposal - 2016-11-08 #9438

Merged
merged 119 commits into from
Nov 8, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
c6e429a
doc: add CTC meeting minutes for 2016-10-12
mhdawson Oct 13, 2016
362c307
src: speed up module loading, skip EOF read
bnoordhuis Oct 17, 2016
8b53f3c
src: speed up module loading, don't resize buffer
bnoordhuis Oct 17, 2016
9e753ba
src: simplify code, remove NodeInstanceData
bnoordhuis Oct 21, 2016
f2a3b24
src: clean up program/isolate/env init logic
bnoordhuis Oct 21, 2016
4be1ba5
test: move flaky test to test/pummel
bnoordhuis Oct 22, 2016
2044619
test: make flaky pummel test more reliable
bnoordhuis Oct 22, 2016
21ba3e3
test: add more module loader test coverage
bnoordhuis Oct 19, 2016
c231130
module: skip directories known not to exist
bnoordhuis Oct 19, 2016
2e7b078
inspector: fix request path nullptr dereference
bnoordhuis Oct 19, 2016
06b4140
test: remove test-v8-inspector-json-protocol test
bnoordhuis Oct 19, 2016
9372aee
lib: fix beforeExit not working with -e
bnoordhuis Sep 28, 2016
63ef099
test: add coverage for execFileSync() errors
cjihrig Oct 20, 2016
d573acf
child_process: remove unreachable execSync() code
cjihrig Oct 20, 2016
d1c32aa
doc: mention case-insensitive env on windows
oliversalzburg Oct 18, 2016
44427cc
test: case sensitivity of env variables
oliversalzburg Oct 18, 2016
60a5b51
src: add NODE_PRESERVE_SYMLINKS environment variable
Sep 20, 2016
ce00a9d
doc: add performance warning to require.extensions
bnoordhuis Oct 19, 2016
efb62aa
test: fix flaky test by removing timer
evanlucas Oct 20, 2016
a39b98e
test: add common.hasIntl
jasnell Oct 23, 2016
5e138fe
test: skip whatwg url parse and setter tests when icu is missing
jasnell Oct 23, 2016
deef2f6
test: add child_process.exec() timeout coverage
cjihrig Oct 20, 2016
53520f0
test: clean up `test-child-process-exec-cwd.js`
jeenalee Oct 21, 2016
d24bd20
lib: make `String(global) === '[object global]'`
addaleax Oct 25, 2016
85a9295
src,tools: speed up startup by 2.5%
bnoordhuis May 13, 2016
c342bda
src: make cross-context MakeCallback() calls work
bnoordhuis Oct 21, 2016
08e12c7
src: remove superfluous env_string string
bnoordhuis Oct 20, 2016
a5c62cb
readline: use icu based string width calculation
jasnell Oct 11, 2016
0939edd
buffer: add buffer.transcode
jasnell Oct 11, 2016
57c0a9b
src: remove unused function
mscdex Oct 23, 2016
106d719
deps: upgrade libuv to 1.10.0
cjihrig Oct 25, 2016
939d102
inspector: switch to new inspector APIs
Oct 5, 2016
fc9e6a3
test: remove err timer from test-http-set-timeout
BethGriggs Oct 24, 2016
f39eb05
test: use strict assertions in module loader test
bnoordhuis Oct 24, 2016
bdad1e2
tools: make --repeat work with -j in test.py
Trott Oct 24, 2016
2ad81ed
test: refactor /parallel/test-cluster-uncaught-exception.js to ES6
deverickapollo Oct 21, 2016
d2e7882
doc: add 2016-10-19 CTC meeting minutes
joshgav Oct 19, 2016
8211904
doc: fix typo in http.md
anu0012 Oct 18, 2016
1c59cef
repl: make `key` of `repl.write()` optional always
addaleax Oct 20, 2016
0b9d80a
repl: don’t write to input stream in editor mode
addaleax Oct 20, 2016
4f0596f
util: use template strings
a0viedo Oct 17, 2016
3f90481
doc: clarify relation between a file and a module
marzelin Oct 11, 2016
0ce0abf
events,test: fix TypeError in EventEmitter warning
jseagull Oct 10, 2016
a0074e2
doc: clarify buffer toString docs.
Oct 8, 2016
a3f6854
doc: more realistic custom inspect example
Havvy Oct 1, 2016
9940666
intl: Add more versions from ICU
srl295 Oct 24, 2016
c23ece7
tools: remove dangling eslint symlink
sam-github Oct 26, 2016
d49d990
test: prevent workers outliving parent
sam-github Oct 24, 2016
c745890
doc: reference signal(7) for the list of signals
emadb Oct 27, 2016
d6f688a
test: writable stream finished state
italoacasas Sep 27, 2016
248a320
test: writable stream ending state
italoacasas Sep 22, 2016
c9b67c6
test: writable stream needDrain state
italoacasas Sep 27, 2016
edd8926
doc: update CONTRIBUTING.md to address editing PRs
gibfahn Oct 19, 2016
0ab008e
test: fix lint error regarding unused commons const
danbev Oct 28, 2016
212da12
buffer: use correct name for custom inspect symbol
charmander Oct 26, 2016
f7d8481
build: use wxneeded on openbsd
qbit Oct 21, 2016
0f871e1
deps: back port OpenBSD fix in c-ares/c-ares
qbit Oct 23, 2016
6f35e44
http: add debug message for invalid header value
evanlucas Oct 19, 2016
6c9e4fd
test: refactor test-async-wrap-check-providers
Oct 26, 2016
5ab172e
src: fix use of uninitialized variable
jasnell Oct 25, 2016
8b7ce8b
test: fix flaky test-fs-watch-recursive on OS X
Trott Oct 26, 2016
bd9cb40
test: run all of test-timers-blocking-callback
Trott Oct 26, 2016
fab8eb6
benchmark: add microbenchmarks for ES Map
rvagg Jul 7, 2016
1037463
test: add child_process customFds test
cjihrig Oct 27, 2016
4e3731c
child_process: remove unreachable code
cjihrig Oct 27, 2016
411b133
test: fix freebsd10-64 CI failures
Trott Oct 27, 2016
01b626a
test: clean up dgram-broadcast-multi-process test
iredelmeier Oct 27, 2016
d8eaa14
build: prioritise --shared-X-Y over pkg-config
rvagg Oct 30, 2016
7f1a40d
doc: add 2016-09-28 CTC meeting minutes
joshgav Oct 27, 2016
31690a6
doc: add 2016-10-05 CTC meeting minutes
joshgav Oct 27, 2016
3550419
events: remove unnecessary checks
cjihrig Oct 27, 2016
827000e
deps: Intl: ICU 58 bump: configure/LICENSE/docs
srl295 Oct 19, 2016
3d1766f
deps: Intl: ICU 58 bump - small icu (BIG COMMIT)
srl295 Oct 20, 2016
eeabab3
doc: add 2016-10-26 CTC meeting minutes
Trott Oct 28, 2016
dbeadd3
doc: update OpenSSL links
kobelb Oct 28, 2016
225a9df
doc: fs: fix link to mkdtemp
coderaiser Oct 31, 2016
3d4a829
doc: fix broken links to Buffer.from(string)
jmm Oct 26, 2016
0c236d1
src: replace SetNamedPropertyHandler()
AnnaMag Oct 6, 2016
e451022
test: refactor test-http-client-readable
Trott Oct 28, 2016
d09eb9c
net: name anonymous functions
pvsousalima Oct 29, 2016
071836a
repl: name anonymous functions
pvsousalima Oct 29, 2016
5bfefa6
lib: change == to === in linkedlist
jedireza Oct 29, 2016
c554f09
doc: fix outdate ninja link
lovexi Oct 25, 2016
ff69e38
doc: add more internal links to fs.Stats object
zeke Oct 28, 2016
d4b5095
doc: use 'an' over 'a', remove redundant sentence
zeke Oct 28, 2016
7b0e937
child_process: add public API for IPC channel
cjihrig Oct 27, 2016
d12ed29
test: remove timer in test-dgram-send-empty-array
Trott Oct 29, 2016
3af9453
doc: move stray sentences in zlib doc
Trott Oct 30, 2016
ed3f80a
test: add test for HTTP client "aborted" event
kemitchell Jun 22, 2016
b51db71
build: make node-gyp output silent
thefourtheye Oct 9, 2016
e696bc3
test: increase test coverage for lib/zlib.js
Trott Oct 30, 2016
1c3487b
test: remove timers from streams test
addaleax Oct 29, 2016
a8295d8
doc: update Diagnostics WG info
joshgav Oct 27, 2016
c2fab3c
doc: add Sakthipriyan to the CTC
rvagg Nov 2, 2016
60461d2
repl: refactor lib/repl.js
Trott Oct 31, 2016
513da40
tools: enforce function name matching in linter
Trott Nov 1, 2016
dafdb7b
benchmark: add trailing newline for consistency
silverwind Nov 1, 2016
aac4af2
tools: enable final newline in .editorconfig
silverwind Nov 1, 2016
b1ef638
src: default --icu_case_mapping on as a v8 option
srl295 Nov 3, 2016
f1f00df
deps: upgrade npm to 3.10.9
zkat Oct 26, 2016
c70c96a
buffer: coerce offset using Math.trunc()
cjihrig Oct 28, 2016
9d9ea81
test: move timer-dependent test to sequential
Trott Nov 3, 2016
4bb9d21
doc: update GOVERNANCE.md to use "meeting chair"
Trott Nov 3, 2016
90aac7c
build: start comments at beginning of line
thefourtheye Oct 31, 2016
bc2d1c9
doc: do not link in the headings
thefourtheye Nov 2, 2016
ed8df17
doc: note that tests should include a description
gibfahn Nov 5, 2016
675a4b2
test: update http-header-obstext
gibfahn Nov 5, 2016
4c4132e
doc: update minute-taking procedure for CTC
Trott Nov 2, 2016
f640baf
test: fix flaky test-force-repl-with-eval
santigimeno Nov 4, 2016
6eb6816
test: fix flaky test-net-GH-5504
santigimeno Nov 4, 2016
b083086
vm: name anonymous functions
solebox Oct 31, 2016
44792f8
benchmark,lib,test,tools: remove unneeded . escape
Trott Nov 3, 2016
1109d0b
build: reduce noise from doc target
danbev Nov 4, 2016
6e1eb59
test: improve test-debugger-util-regression
santigimeno Nov 6, 2016
ceec520
build: add MAKEFLAGS="-j1" to node-gyp
danbev Nov 3, 2016
0325339
tools: use long format for gpg fingerprint
MylesBorins Oct 24, 2016
173b088
inspector: do not prompt to use localhost
Nov 3, 2016
0a3a967
2016-11-08, Version 7.1.0 (Current)
evanlucas Nov 3, 2016
3daf116
Working on v7.1.1
evanlucas Nov 8, 2016
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
src: clean up program/isolate/env init logic
Reorder the initialization logic so that program-wide, per-isolate and
per-environment initialization is more cleanly separated.

PR-URL: #9224
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
bnoordhuis authored and evanlucas committed Nov 2, 2016
commit f2a3b24611c68c57358570ac597f4d1f379d01b6
2 changes: 0 additions & 2 deletions src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ void Environment::Start(int argc,
HandleScope handle_scope(isolate());
Context::Scope context_scope(context());

isolate()->SetAutorunMicrotasks(false);

uv_check_init(event_loop(), immediate_check_handle());
uv_unref(reinterpret_cast<uv_handle_t*>(immediate_check_handle()));

Expand Down
161 changes: 81 additions & 80 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3341,11 +3341,6 @@ void SetupProcessObject(Environment* env,
#undef READONLY_PROPERTY


static void AtProcessExit() {
uv_tty_reset_mode();
}


void SignalExit(int signo) {
uv_tty_reset_mode();
#ifdef __FreeBSD__
Expand Down Expand Up @@ -3375,11 +3370,6 @@ static void RawDebug(const FunctionCallbackInfo<Value>& args) {
void LoadEnvironment(Environment* env) {
HandleScope handle_scope(env->isolate());

env->isolate()->SetFatalErrorHandler(node::OnFatalError);
env->isolate()->AddMessageListener(OnMessage);

atexit(AtProcessExit);

TryCatch try_catch(env->isolate());

// Disable verbose mode to stop FatalException() handler from trying
Expand Down Expand Up @@ -4369,107 +4359,118 @@ void FreeEnvironment(Environment* env) {
}


inline int Start(Isolate* isolate, IsolateData* isolate_data,
int argc, const char* const* argv,
int exec_argc, const char* const* exec_argv) {
HandleScope handle_scope(isolate);
Local<Context> context = Context::New(isolate);
Context::Scope context_scope(context);
Environment env(isolate_data, context);
env.Start(argc, argv, exec_argc, exec_argv, v8_is_profiling);

// Start debug agent when argv has --debug
if (use_debug_agent) {
const char* path = argc > 1 ? argv[1] : nullptr;
StartDebug(&env, path, debug_wait_connect);
if (use_inspector && !debugger_running)
return 12; // Signal internal error.
}

{
Environment::AsyncCallbackScope callback_scope(&env);
LoadEnvironment(&env);
}

env.set_trace_sync_io(trace_sync_io);

// Enable debugger
if (use_debug_agent)
EnableDebug(&env);

{
SealHandleScope seal(isolate);
bool more;
do {
v8_platform.PumpMessageLoop(isolate);
more = uv_run(env.event_loop(), UV_RUN_ONCE);

if (more == false) {
v8_platform.PumpMessageLoop(isolate);
EmitBeforeExit(&env);

// Emit `beforeExit` if the loop became alive either after emitting
// event, or after running some callbacks.
more = uv_loop_alive(env.event_loop());
if (uv_run(env.event_loop(), UV_RUN_NOWAIT) != 0)
more = true;
}
} while (more == true);
}

env.set_trace_sync_io(false);

const int exit_code = EmitExit(&env);
RunAtExit(&env);

WaitForInspectorDisconnect(&env);
#if defined(LEAK_SANITIZER)
__lsan_do_leak_check();
#endif

return exit_code;
}

inline int Start(uv_loop_t* event_loop,
int argc, const char* const* argv,
int exec_argc, const char* const* exec_argv) {
Isolate::CreateParams params;
ArrayBufferAllocator array_buffer_allocator;
params.array_buffer_allocator = &array_buffer_allocator;
ArrayBufferAllocator allocator;
params.array_buffer_allocator = &allocator;
#ifdef NODE_ENABLE_VTUNE_PROFILING
params.code_event_handler = vTune::GetVtuneCodeEventHandler();
#endif
Isolate* isolate = Isolate::New(params);

Isolate* const isolate = Isolate::New(params);
if (isolate == nullptr)
return 12; // Signal internal error.

isolate->AddMessageListener(OnMessage);
isolate->SetAbortOnUncaughtExceptionCallback(ShouldAbortOnUncaughtException);
isolate->SetAutorunMicrotasks(false);
isolate->SetFatalErrorHandler(OnFatalError);

if (track_heap_objects) {
isolate->GetHeapProfiler()->StartTrackingHeapObjects(true);
}

{
Mutex::ScopedLock scoped_lock(node_isolate_mutex);
CHECK_EQ(node_isolate, nullptr);
node_isolate = isolate;
}

if (track_heap_objects) {
isolate->GetHeapProfiler()->StartTrackingHeapObjects(true);
}

int exit_code;
{
Locker locker(isolate);
Isolate::Scope isolate_scope(isolate);
HandleScope handle_scope(isolate);
IsolateData isolate_data(isolate, event_loop,
array_buffer_allocator.zero_fill_field());
Local<Context> context = Context::New(isolate);
Context::Scope context_scope(context);
Environment env(&isolate_data, context);
env.Start(argc, argv, exec_argc, exec_argv, v8_is_profiling);

isolate->SetAbortOnUncaughtExceptionCallback(
ShouldAbortOnUncaughtException);

// Start debug agent when argv has --debug
if (use_debug_agent) {
const char* path = argc > 1 ? argv[1] : nullptr;
StartDebug(&env, path, debug_wait_connect);
if (use_inspector && !debugger_running) {
exit(12);
}
}

{
Environment::AsyncCallbackScope callback_scope(&env);
LoadEnvironment(&env);
}

env.set_trace_sync_io(trace_sync_io);

// Enable debugger
if (use_debug_agent)
EnableDebug(&env);

{
SealHandleScope seal(isolate);
bool more;
do {
v8_platform.PumpMessageLoop(isolate);
more = uv_run(env.event_loop(), UV_RUN_ONCE);

if (more == false) {
v8_platform.PumpMessageLoop(isolate);
EmitBeforeExit(&env);

// Emit `beforeExit` if the loop became alive either after emitting
// event, or after running some callbacks.
more = uv_loop_alive(env.event_loop());
if (uv_run(env.event_loop(), UV_RUN_NOWAIT) != 0)
more = true;
}
} while (more == true);
}

env.set_trace_sync_io(false);

exit_code = EmitExit(&env);
RunAtExit(&env);

WaitForInspectorDisconnect(&env);
#if defined(LEAK_SANITIZER)
__lsan_do_leak_check();
#endif
IsolateData isolate_data(isolate, event_loop, allocator.zero_fill_field());
exit_code = Start(isolate, &isolate_data, argc, argv, exec_argc, exec_argv);
}

{
Mutex::ScopedLock scoped_lock(node_isolate_mutex);
if (node_isolate == isolate)
node_isolate = nullptr;
CHECK_EQ(node_isolate, isolate);
node_isolate = nullptr;
}

CHECK_NE(isolate, nullptr);
isolate->Dispose();
isolate = nullptr;

return exit_code;
}

int Start(int argc, char** argv) {
atexit([] () { uv_tty_reset_mode(); });
PlatformInit();

CHECK_GT(argc, 0);
Expand Down