summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-10-14 18:20:40 -0400
committercjihrig <cjihrig@gmail.com>2018-10-17 12:26:18 -0400
commit7872d7933be571dabfa94259433612a34b885513 (patch)
treedadf8026b9def2b358be84ddfdd28dbf33397a23 /src
parentcf3f8dd42ea153efce77d69f7be9ca0f99cc7b09 (diff)
downloadandroid-node-v8-7872d7933be571dabfa94259433612a34b885513.tar.gz
android-node-v8-7872d7933be571dabfa94259433612a34b885513.tar.bz2
android-node-v8-7872d7933be571dabfa94259433612a34b885513.zip
src: update v8::Object::GetPropertyNames() usage
Use the non-deprecated version of GetPropertyNames(). PR-URL: https://github.com/nodejs/node/pull/23660 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_contextify.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc
index 9559747467..3fbc616fda 100644
--- a/src/node_contextify.cc
+++ b/src/node_contextify.cc
@@ -508,7 +508,12 @@ void ContextifyContext::PropertyEnumeratorCallback(
if (ctx->context_.IsEmpty())
return;
- args.GetReturnValue().Set(ctx->sandbox()->GetPropertyNames());
+ Local<Array> properties;
+
+ if (!ctx->sandbox()->GetPropertyNames(ctx->context()).ToLocal(&properties))
+ return;
+
+ args.GetReturnValue().Set(properties);
}
// static