diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 9c09bbb5fff3d1..c99f6c7ea5aef5 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -504,7 +504,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