Skip to content

Commit

Permalink
setup vm context for DOM access
Browse files Browse the repository at this point in the history
NWJS#4018
  • Loading branch information
rogerwang committed Jan 8, 2017
1 parent a33ec15 commit 78766fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ class ContextifyContext {
// 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);
void* data = env->context()->GetAlignedPointerFromEmbedderData(2); //v8ContextPerContextDataIndex
ctx->SetAlignedPointerInEmbedderData(2, data);
ctx->SetAlignedPointerInEmbedderData(33, (void*)0x08110800);
sandbox_obj->SetPrivate(env->context(),
env->contextify_global_private_symbol(),
ctx->Global());
Expand Down

0 comments on commit 78766fc

Please sign in to comment.