diff options
author | Timothy Gu <timothygu99@gmail.com> | 2018-06-22 08:25:12 +0300 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2018-06-26 06:15:35 +0300 |
commit | 65f617314d1ea2df8b9e16fb7e7078b5913c749c (patch) | |
tree | 719a8cf6099c336eddf75af226ca1bfbd0b73965 /src/cares_wrap.cc | |
parent | cd8adfaf98613fb0ae4ba71018a236906f67f286 (diff) |
src: start annotating native code side effect
PR-URL: https://github.com/nodejs/node/pull/21458
Refs: https://github.com/nodejs/node/issues/20977
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/cares_wrap.cc')
-rw-r--r-- | src/cares_wrap.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 05ef2b7e120..3cf1d434d3c 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -2107,8 +2107,8 @@ void Initialize(Local<Object> target, env->SetMethod(target, "getaddrinfo", GetAddrInfo); env->SetMethod(target, "getnameinfo", GetNameInfo); - env->SetMethod(target, "isIPv6", IsIPv6); - env->SetMethod(target, "canonicalizeIP", CanonicalizeIP); + env->SetMethodNoSideEffect(target, "isIPv6", IsIPv6); + env->SetMethodNoSideEffect(target, "canonicalizeIP", CanonicalizeIP); env->SetMethod(target, "strerror", StrError); @@ -2165,7 +2165,7 @@ void Initialize(Local<Object> target, env->SetProtoMethod(channel_wrap, "querySoa", Query<QuerySoaWrap>); env->SetProtoMethod(channel_wrap, "getHostByAddr", Query<GetHostByAddrWrap>); - env->SetProtoMethod(channel_wrap, "getServers", GetServers); + env->SetProtoMethodNoSideEffect(channel_wrap, "getServers", GetServers); env->SetProtoMethod(channel_wrap, "setServers", SetServers); env->SetProtoMethod(channel_wrap, "cancel", Cancel); |