diff options
author | Gus Caplan <me@gus.host> | 2018-03-04 14:59:51 -0600 |
---|---|---|
committer | Gus Caplan <me@gus.host> | 2018-03-07 12:19:38 -0600 |
commit | c9b4de55c061ecb8d64cda9e36821c21f8150925 (patch) | |
tree | 51813a516bb2ac257ff51d8b1a9059a30bc07013 /src/node_contextify.cc | |
parent | a6c14b2f4259a9ca080a7b486dc934e4ccef8938 (diff) | |
download | android-node-v8-c9b4de55c061ecb8d64cda9e36821c21f8150925.tar.gz android-node-v8-c9b4de55c061ecb8d64cda9e36821c21f8150925.tar.bz2 android-node-v8-c9b4de55c061ecb8d64cda9e36821c21f8150925.zip |
src: standardise context embedder indices
PR-URL: https://github.com/nodejs/node/pull/19135
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Diffstat (limited to 'src/node_contextify.cc')
-rw-r--r-- | src/node_contextify.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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<Context> 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()); |