Skip to content

Instantly share code, notes, and snippets.

@korzio
Created August 12, 2018 12:14
Show Gist options
  • Save korzio/2fa434c4701b4e7d5acf8a12de3df693 to your computer and use it in GitHub Desktop.
Save korzio/2fa434c4701b4e7d5acf8a12de3df693 to your computer and use it in GitHub Desktop.
HandleScope handle_scope(isolate);
Local<Context> context = NewContext(isolate);
Context::Scope context_scope(context);
Environment env(isolate_data, context, v8_platform.GetTracingAgent());
env.Start(argc, argv, exec_argc, exec_argv, v8_is_profiling);
{
Environment::AsyncCallbackScope callback_scope(&env);
env.async_hooks()->push_async_ids(1, 0);
LoadEnvironment(&env);
env.async_hooks()->pop_async_id(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment