Lines Matching defs:env
29 JSUDPWrap(Environment* env, Local<Object> obj);
54 JSUDPWrap::JSUDPWrap(Environment* env, Local<Object> obj)
55 : AsyncWrap(env, obj, PROVIDER_JSUDPWRAP) {
63 HandleScope scope(env()->isolate());
64 Context::Scope context_scope(env()->context());
65 TryCatchScope try_catch(env());
68 if (!MakeCallback(env()->onreadstart_string(), 0, nullptr).ToLocal(&value) ||
69 !value->Int32Value(env()->context()).To(&value_int)) {
71 errors::TriggerUncaughtException(env()->isolate(), try_catch);
77 HandleScope scope(env()->isolate());
78 Context::Scope context_scope(env()->context());
79 TryCatchScope try_catch(env());
82 if (!MakeCallback(env()->onreadstop_string(), 0, nullptr).ToLocal(&value) ||
83 !value->Int32Value(env()->context()).To(&value_int)) {
85 errors::TriggerUncaughtException(env()->isolate(), try_catch);
93 HandleScope scope(env()->isolate());
94 Context::Scope context_scope(env()->context());
95 TryCatchScope try_catch(env());
102 buffers[i] = Buffer::Copy(env(), bufs[i].base, bufs[i].len)
108 if (!AddressToJS(env(), addr).ToLocal(&address)) return value_int;
112 Array::New(env()->isolate(), buffers.out(), nbufs),
116 if (!MakeCallback(env()->onwrite_string(), arraysize(args), args)
118 !value->IntegerValue(env()->context()).To(&value_int)) {
120 errors::TriggerUncaughtException(env()->isolate(), try_catch);
138 Environment* env = Environment::GetCurrent(args);
140 new JSUDPWrap(env, args.Holder());
146 Environment* env = wrap->env();
157 Utf8Value address(env->isolate(), args[2]);
201 Environment* env = Environment::GetCurrent(context);
202 Isolate* isolate = env->isolate();
207 t->Inherit(AsyncWrap::GetConstructorTemplate(env));
209 UDPWrapBase::AddMethods(env, t);