aboutsummaryrefslogtreecommitdiff
path: root/src/async-wrap-inl.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2016-03-31 12:47:06 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2016-04-05 11:37:02 +0200
commita7581d0859ce5139b2d7795c5ac1f8df0e85815c (patch)
treeeeb93d30f9690d1ee6e96a46685574aeba25ca9d /src/async-wrap-inl.h
parent00c876dec54f9c515aeed78c75ce61a4e0206d95 (diff)
downloadandroid-node-v8-a7581d0859ce5139b2d7795c5ac1f8df0e85815c.tar.gz
android-node-v8-a7581d0859ce5139b2d7795c5ac1f8df0e85815c.tar.bz2
android-node-v8-a7581d0859ce5139b2d7795c5ac1f8df0e85815c.zip
src: replace ARRAY_SIZE with typesafe arraysize
To prevent `ARRAY_SIZE(&arg)` (i.e., taking the array size of a pointer) from happening again. PR-URL: https://github.com/nodejs/node/pull/5969 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/async-wrap-inl.h')
-rw-r--r--src/async-wrap-inl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h
index e61e2ad4bf..cf7024e7e3 100644
--- a/src/async-wrap-inl.h
+++ b/src/async-wrap-inl.h
@@ -54,7 +54,7 @@ inline AsyncWrap::AsyncWrap(Environment* env,
v8::TryCatch try_catch(env->isolate());
v8::MaybeLocal<v8::Value> ret =
- init_fn->Call(env->context(), object, ARRAY_SIZE(argv), argv);
+ init_fn->Call(env->context(), object, arraysize(argv), argv);
if (ret.IsEmpty()) {
ClearFatalExceptionHandlers(env);