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 backport] node internals' postmortem metadata (#14901, #18530, #18653, #18576) #18550

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ea86656
net: use `_final` instead of `on('finish')`
addaleax Feb 7, 2018
1fd4e4d
src: fix deprecation warning in node_perf.cc
danbev Feb 20, 2018
15c9a71
doc: remove CII badge in README
silverwind Feb 21, 2018
dfe0bc1
cluster: fix inspector port assignment
santigimeno Feb 10, 2018
9d73910
net: inline and simplify onSocketEnd
addaleax Feb 6, 2018
ad98ff1
vm: consolidate validation
timotew Feb 12, 2018
e29acf8
tools: fix custom eslint rule errors
BridgeAR Feb 18, 2018
04f0482
build, win: vcbuild improvements
bzoz Nov 13, 2017
e3f901c
http: allow _httpMessage to be GC'ed
lpinca Feb 19, 2018
2ad7cb9
test: http2 compat response.write() error checks
trivikr Feb 18, 2018
f6e2ba4
repl: fix tab-complete warning
killagu Feb 20, 2018
8773c10
src: fix abort when taking a heap snapshot
bnoordhuis Feb 21, 2018
4bce02a
http: remove default 'drain' listener on upgrade
lpinca Feb 19, 2018
b4e13b0
doc: fix link in onboarding.md
justin0022 Feb 20, 2018
8d0cc17
doc: update description of 'clientError' event
lpinca Feb 20, 2018
d240009
doc: remove extraneous "for example" text
Trott Feb 20, 2018
5477060
url: reduce deplicated codes in `autoEscapeStr`
starkwang Feb 7, 2018
d58dcec
deps: upgrade libuv to 1.19.2
cjihrig Feb 21, 2018
0075f8c
tools: ignore VS compiler output in deps/v8
targos Feb 23, 2018
89323da
src: remove node namespace qualifiers
danbev Feb 23, 2018
eb4ab48
doc: `readable.push(undefined)` in non-object mode
Jan 21, 2018
b5ecc45
doc: add process.debugPort to doc/api/process.md
flickz Feb 11, 2018
795f39b
doc: update 2fa information in onboarding.md
Trott Feb 24, 2018
415e777
doc: mention git-node in the collaborator guide
joyeecheung Feb 23, 2018
5c727a0
doc: remove `Returns: {undefined}`
Feb 21, 2018
534de4a
build: make gyp user defined variables lowercase
danbev Oct 16, 2017
70c9ad9
tools, test: fix prof polyfill readline
killagu Feb 11, 2018
8beecb2
build: include the libuv and zlib into node
yhwang Jan 17, 2018
61436e8
process: use more direct sync I/O for stdio
addaleax Dec 30, 2017
d2a752f
src: remove `HasWriteQueue()`
addaleax Dec 30, 2017
c8741ba
src: use `DoTryWrite()` for not-all-Buffer writev()s too
addaleax Jan 10, 2018
35b0936
tty: fix console printing on Windows
addaleax Jan 17, 2018
a3aebea
test: stdio pipe behavior tests
bzoz Feb 7, 2018
367241a
src: refactor stream callbacks and ownership
addaleax Jan 8, 2018
6a70933
src: simplify handles for libuv streams
addaleax Jan 24, 2018
3e1d810
test: introduce SetUpTestCase/TearDownTestCase
danbev Feb 3, 2018
337d529
lib: add `process` to internal module wrapper
addaleax Nov 21, 2017
fc2fc21
process: refactor nextTick for clarity
apapirovski Dec 18, 2017
7f9b554
process: do not directly schedule _tickCallback in _fatalException
apapirovski Dec 23, 2017
839a3f7
timers: make setImmediate() immune to tampering
bnoordhuis Dec 18, 2017
d82efdb
src: use AliasedBuffer for TickInfo
apapirovski Dec 27, 2017
d2475cc
timers: refactor setImmediate error handling
apapirovski Dec 26, 2017
2177138
timers: allow Immediates to be unrefed
apapirovski Jan 13, 2018
b04d42d
src, test: node internals' postmortem metadata
Dec 26, 2017
7d12ef6
test: fix cctest -Wunused-variable warning
bnoordhuis Feb 2, 2018
d26e658
src: do not redefine private for GenDebugSymbols
joyeecheung Feb 8, 2018
686a66d
build: add node_lib_target_name to cctest deps
danbev Feb 5, 2018
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: remove HasWriteQueue()
Tests are passing without it, and this otherwise makes the
code harder to reason about because the `async` flag on the
write request object would not be set even though the callback
would still be pending.

PR-URL: #18019
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
addaleax committed Feb 26, 2018
commit d2a752ff63ee00a334f46dfccefd5c88e32e151e
13 changes: 3 additions & 10 deletions src/stream_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) {
}

err = DoWrite(req_wrap, buf_list, count, nullptr);
if (HasWriteQueue())
req_wrap_obj->Set(env->async(), True(env->isolate()));
req_wrap_obj->Set(env->async(), True(env->isolate()));

if (err)
req_wrap->Dispose();
Expand Down Expand Up @@ -254,8 +253,7 @@ int StreamBase::WriteBuffer(const FunctionCallbackInfo<Value>& args) {
}

err = DoWrite(req_wrap, bufs, count, nullptr);
if (HasWriteQueue())
req_wrap_obj->Set(env->async(), True(env->isolate()));
req_wrap_obj->Set(env->async(), True(env->isolate()));
req_wrap_obj->Set(env->buffer_string(), args[1]);

if (err)
Expand Down Expand Up @@ -381,8 +379,7 @@ int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) {
reinterpret_cast<uv_stream_t*>(send_handle));
}

if (HasWriteQueue())
req_wrap_obj->Set(env->async(), True(env->isolate()));
req_wrap_obj->Set(env->async(), True(env->isolate()));

if (err)
req_wrap->Dispose();
Expand Down Expand Up @@ -476,10 +473,6 @@ int StreamResource::DoTryWrite(uv_buf_t** bufs, size_t* count) {
return 0;
}

bool StreamResource::HasWriteQueue() {
return true;
}


const char* StreamResource::Error() const {
return nullptr;
Expand Down
1 change: 0 additions & 1 deletion src/stream_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ class StreamResource {
uv_buf_t* bufs,
size_t count,
uv_stream_t* send_handle) = 0;
virtual bool HasWriteQueue();
virtual const char* Error() const;
virtual void ClearError();

Expand Down
4 changes: 0 additions & 4 deletions src/stream_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,6 @@ int LibuvStreamWrap::DoWrite(WriteWrap* w,
}


bool LibuvStreamWrap::HasWriteQueue() {
return stream()->write_queue_size > 0;
}


void LibuvStreamWrap::AfterUvWrite(uv_write_t* req, int status) {
WriteWrap* req_wrap = WriteWrap::from_req(req);
Expand Down
1 change: 0 additions & 1 deletion src/stream_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class LibuvStreamWrap : public HandleWrap, public StreamBase {
uv_buf_t* bufs,
size_t count,
uv_stream_t* send_handle) override;
bool HasWriteQueue() override;

inline uv_stream_t* stream() const {
return stream_;
Expand Down