From c9b4de55c061ecb8d64cda9e36821c21f8150925 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sun, 4 Mar 2018 14:59:51 -0600 Subject: src: standardise context embedder indices PR-URL: https://github.com/nodejs/node/pull/19135 Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Ben Noordhuis Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Joyee Cheung Reviewed-By: Matheus Marchini --- src/node_contextify.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/node_contextify.cc') diff --git a/src/node_contextify.cc b/src/node_contextify.cc index ef785936b7..d267a5180f 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -23,6 +23,7 @@ #include "node_watchdog.h" #include "base_object-inl.h" #include "node_contextify.h" +#include "node_context_data.h" namespace node { namespace contextify { @@ -173,7 +174,7 @@ Local ContextifyContext::CreateV8Context( // embedder data field. However, we cannot hold a reference to a v8::Context // directly in an Object, we instead hold onto the new context's global // object instead (which then has a reference to the context). - ctx->SetEmbedderData(kSandboxObjectIndex, sandbox_obj); + ctx->SetEmbedderData(ContextEmbedderIndex::kSandboxObject, sandbox_obj); sandbox_obj->SetPrivate(env->context(), env->contextify_global_private_symbol(), ctx->Global()); -- cgit v1.2.3