summaryrefslogtreecommitdiff
path: root/src/node_internals.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2016-09-10 18:19:24 +0200
committerAnna Henningsen <anna@addaleax.net>2016-09-29 09:46:42 +0200
commitea94086ad2b53268b5cb870f9ba5a1f84741fa41 (patch)
tree71a385cacb45a15d7d573105911b93ff0f5f2e11 /src/node_internals.h
parent48ed65440ca33fe6063d92379b3a9b10b65e98e9 (diff)
downloadandroid-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/node_internals.h')
-rw-r--r--src/node_internals.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index 8af4adb053..a54ead49ee 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -160,7 +160,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
virtual void* Allocate(size_t size); // Defined in src/node.cc
virtual void* AllocateUninitialized(size_t size)
- { return node::Malloc(size); }
+ { return node::UncheckedMalloc(size); }
virtual void Free(void* data, size_t) { free(data); }
private: