Lines Matching defs:env

5 #include "env-inl.h"
44 Environment* env = stream_env();
46 v8::HandleScope handle_scope(env->isolate());
49 if (!env->shutdown_wrap_template()
50 ->NewInstance(env->context())
70 ->Set(env->context(),
71 env->error_string(),
72 OneByteString(env->isolate(), msg))
87 Environment* env = stream_env();
101 v8::HandleScope handle_scope(env->isolate());
104 if (!env->write_wrap_template()
105 ->NewInstance(env->context())
127 ->Set(env->context(),
128 env->error_string(),
129 OneByteString(env->isolate(), msg))
180 Environment* env = Environment::GetCurrent(args);
181 Isolate* isolate = env->isolate();
182 Local<Context> context = env->context();
246 NoArrayBufferZeroFillScope no_zero_fill_scope(env->isolate_data());
299 Environment* env = Environment::GetCurrent(args);
302 node::THROW_ERR_INVALID_ARG_TYPE(env, "Second argument must be a buffer");
321 if (req_wrap_obj->Set(env->context(),
322 env->handle_string(),
337 Environment* env = Environment::GetCurrent(args);
338 Isolate* isolate = env->isolate();
401 NoArrayBufferZeroFillScope no_zero_fill_scope(env->isolate_data());
407 NoArrayBufferZeroFillScope no_zero_fill_scope(env->isolate_data());
428 if (req_wrap_obj->Set(env->context(),
429 env->handle_string(),
450 Environment* env = env_;
464 env->stream_base_state()[kReadBytesOrError] = static_cast<int32_t>(nread);
465 env->stream_base_state()[kArrayBufferOffset] = offset;
468 ab.IsEmpty() ? Undefined(env->isolate()).As<Value>() : ab.As<Value>()
495 void StreamBase::AddMethod(Environment* env,
501 Isolate* isolate = env->isolate();
512 void StreamBase::AddMethods(Environment* env, Local<FunctionTemplate> t) {
513 Isolate* isolate = env->isolate();
520 AddMethod(env, sig, attributes, t, GetFD, env->fd_string());
522 env, sig, attributes, t, GetExternal, env->external_stream_string());
523 AddMethod(env, sig, attributes, t, GetBytesRead, env->bytes_read_string());
525 env, sig, attributes, t, GetBytesWritten, env->bytes_written_string());
645 Environment* env = static_cast<StreamBase*>(stream_)->stream_env();
646 return env->allocate_managed_buffer(suggested_size);
652 Environment* env = stream->stream_env();
653 Isolate* isolate = env->isolate();
655 Context::Scope context_scope(env->context());
656 std::unique_ptr<BackingStore> bs = env->release_managed_buffer(buf_);
680 Environment* env = stream->stream_env();
681 HandleScope handle_scope(env->isolate());
682 Context::Scope context_scope(env->context());
709 Environment* env = stream->stream_env();
710 if (!env->can_call_into_js()) return;
712 HandleScope handle_scope(env->isolate());
713 Context::Scope context_scope(env->context());
718 Integer::New(env->isolate(), status),
720 Undefined(env->isolate())
725 argv[2] = OneByteString(env->isolate(), msg);
729 if (req_wrap_obj->Has(env->context(), env->oncomplete_string()).FromJust())
730 async_wrap->MakeCallback(env->oncomplete_string(), arraysize(argv), argv);
821 Environment* env = async_wrap->env();
823 v8::HandleScope handle_scope(env->isolate());
825 ->Set(env->context(),
826 env->error_string(),
827 OneByteString(env->isolate(), error_str))