PageRenderTime 19ms CodeModel.GetById 10ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/c_src/erlv8_taint.cc

http://github.com/beamjs/erlv8
C++ | 21 lines | 19 code | 2 blank | 0 comment | 0 complexity | 0c7e4878a6df121510c67c3ea4886f5b MD5 | raw file
 1#include "erlv8.hh"
 2
 3TickHandler(TaintTickHandler) {
 4  TRACE("(%p) tain - 1\n", vm->isolate);
 5  ErlNifEnv *ref_env = enif_alloc_env();
 6  TRACE("(%p) tain - 2\n", vm->isolate);
 7  ERL_NIF_TERM taint_ref = enif_make_copy(ref_env, tick_ref);
 8  TRACE("(%p) tain - 3\n", vm->isolate);
 9  LHCS(vm->isolate, vm->context);
10  TRACE("(%p) tain - 4\n", vm->isolate);
11  SEND(vm->server,
12       enif_make_tuple3(env,
13                        enif_make_atom(env,"result"),
14                        enif_make_copy(env,taint_ref),
15                        js_to_term(vm->context, vm->isolate, env,term_to_js(vm->context, vm->isolate,vm->env, array[1]))));
16
17  enif_free_env(ref_env);
18  TickHandlerResolution result;
19  result.type = DONE;
20  return result;
21}