PageRenderTime 30ms CodeModel.GetById 18ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

/c_src/erlv8_stop.cc

http://github.com/beamjs/erlv8
C++ | 18 lines | 17 code | 1 blank | 0 comment | 0 complexity | 3926cb84e2c265f5fa7a10531014f2b0 MD5 | raw file
 1#include "erlv8.hh"
 2
 3TickHandler(StopTickHandler) {
 4  TRACE("(%p) stop - 1\n", vm->isolate);
 5  v8::Isolate::Scope iscope(vm->isolate);
 6  TRACE("(%p) stop - 2\n", vm->isolate);
 7  v8::HandleScope handle_scope;
 8  TRACE("(%p) stop - 3\n", vm->isolate);
 9  TickHandlerResolution result;
10  TRACE("(%p) stop - 4\n", vm->isolate);
11  v8::V8::TerminateExecution();  
12  TRACE("(%p) stop - 5\n", vm->isolate);
13  result.value = v8::Undefined();
14  TRACE("(%p) stop - 6\n", vm->isolate);
15  result.type = RETURN;
16  TRACE("(%p) stop - 7\n", vm->isolate);
17  return result;
18}