diff options
author | Anna Henningsen <anna@addaleax.net> | 2016-09-10 18:19:24 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2016-09-29 09:46:42 +0200 |
commit | ea94086ad2b53268b5cb870f9ba5a1f84741fa41 (patch) | |
tree | 71a385cacb45a15d7d573105911b93ff0f5f2e11 /src/tls_wrap.cc | |
parent | 48ed65440ca33fe6063d92379b3a9b10b65e98e9 (diff) | |
download | android-node-v8-ea94086ad2b53268b5cb870f9ba5a1f84741fa41.tar.gz android-node-v8-ea94086ad2b53268b5cb870f9ba5a1f84741fa41.tar.bz2 android-node-v8-ea94086ad2b53268b5cb870f9ba5a1f84741fa41.zip |
src: provide allocation + nullptr check shortcuts
Provide shortcut `node::CheckedMalloc()` and friends that
replace `node::Malloc()` + `CHECK_NE(ยท, nullptr);` combinations
in a few places.
PR-URL: https://github.com/nodejs/node/pull/8482
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Diffstat (limited to 'src/tls_wrap.cc')
-rw-r--r-- | src/tls_wrap.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index dbe6677516..d56128fec6 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -662,7 +662,6 @@ void TLSWrap::OnReadImpl(ssize_t nread, void TLSWrap::OnAllocSelf(size_t suggested_size, uv_buf_t* buf, void* ctx) { buf->base = node::Malloc(suggested_size); - CHECK_NE(buf->base, nullptr); buf->len = suggested_size; } |