diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 9559747467440b..3fbc616fda0284 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 properties; + + if (!ctx->sandbox()->GetPropertyNames(ctx->context()).ToLocal(&properties)) + return; + + args.GetReturnValue().Set(properties); } // static