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/node_types.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/node_types.cc')
-rw-r--r-- | src/node_types.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node_types.cc b/src/node_types.cc index 5dac1f6d275..4872491c924 100644 --- a/src/node_types.cc +++ b/src/node_types.cc @@ -56,13 +56,13 @@ void InitializeTypes(Local<Object> target, Local<Context> context) { Environment* env = Environment::GetCurrent(context); -#define V(type) env->SetMethod(target, \ - "is" #type, \ - Is##type); +#define V(type) env->SetMethodNoSideEffect(target, \ + "is" #type, \ + Is##type); VALUE_METHOD_MAP(V) #undef V - env->SetMethod(target, "isAnyArrayBuffer", IsAnyArrayBuffer); + env->SetMethodNoSideEffect(target, "isAnyArrayBuffer", IsAnyArrayBuffer); } } // anonymous namespace |