Skip to content

Commit

Permalink
Fix: abort on unaligned pointer in worker threads on Win
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Oct 22, 2023
1 parent fbbc682 commit e035f85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ BaseObjectPtr<ContextifyContext> ContextifyContext::New(
sandbox_obj);
if (node_is_nwjs) {
void* data = env->context()->GetAlignedPointerFromEmbedderData(2); //v8ContextPerContextDataIndex
v8_context->SetAlignedPointerInEmbedderData(2, data);
if (!((int)data & 1))
v8_context->SetAlignedPointerInEmbedderData(2, data);
v8_context->SetAlignedPointerInEmbedderData(50, (void*)0x08110800);
}

Expand Down

0 comments on commit e035f85

Please sign in to comment.