diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-05-01 23:22:47 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-05-14 01:34:32 +0200 |
commit | 815b3aa8332479a99f06327d76492b887b1b1edf (patch) | |
tree | 4b015a94a6a4e191cdd0c0492b4367bf470a9f0b /src | |
parent | ddbaddcce108855f517308f7bd5d910379b59a3b (diff) | |
download | android-node-v8-815b3aa8332479a99f06327d76492b887b1b1edf.tar.gz android-node-v8-815b3aa8332479a99f06327d76492b887b1b1edf.tar.bz2 android-node-v8-815b3aa8332479a99f06327d76492b887b1b1edf.zip |
vm: mark global proxy as side-effect-free
Fixes: https://github.com/nodejs/node/issues/27518
PR-URL: https://github.com/nodejs/node/pull/27523
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_contextify.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 6590da62c5..77622f8cbd 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -61,6 +61,7 @@ using v8::PrimitiveArray; using v8::PropertyAttribute; using v8::PropertyCallbackInfo; using v8::PropertyDescriptor; +using v8::PropertyHandlerFlags; using v8::Script; using v8::ScriptCompiler; using v8::ScriptOrigin; @@ -149,13 +150,15 @@ MaybeLocal<Context> ContextifyContext::CreateV8Context( if (!CreateDataWrapper(env).ToLocal(&data_wrapper)) return MaybeLocal<Context>(); - NamedPropertyHandlerConfiguration config(PropertyGetterCallback, - PropertySetterCallback, - PropertyDescriptorCallback, - PropertyDeleterCallback, - PropertyEnumeratorCallback, - PropertyDefinerCallback, - data_wrapper); + NamedPropertyHandlerConfiguration config( + PropertyGetterCallback, + PropertySetterCallback, + PropertyDescriptorCallback, + PropertyDeleterCallback, + PropertyEnumeratorCallback, + PropertyDefinerCallback, + data_wrapper, + PropertyHandlerFlags::kHasNoSideEffect); IndexedPropertyHandlerConfiguration indexed_config( IndexedPropertyGetterCallback, @@ -164,7 +167,8 @@ MaybeLocal<Context> ContextifyContext::CreateV8Context( IndexedPropertyDeleterCallback, PropertyEnumeratorCallback, IndexedPropertyDefinerCallback, - data_wrapper); + data_wrapper, + PropertyHandlerFlags::kHasNoSideEffect); object_template->SetHandler(config); object_template->SetHandler(indexed_config); |