py::object CDebug::GetDebugContext(void) { v8::HandleScope handle_scope; return py::object(py::handle<>(boost::python::converter::shared_ptr_to_python<CContext>( CContextPtr(new CContext(m_debug_context))))); }
py::object CContext::GetCalling(void) { v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Handle<v8::Context> calling = v8::Isolate::GetCurrent()->GetCallingContext(); return (!v8::Isolate::GetCurrent()->InContext() || calling.IsEmpty()) ? py::object() : py::object(py::handle<>(boost::python::converter::shared_ptr_to_python<CContext>(CContextPtr(new CContext(calling))))); }