Lines Matching defs:env

112     Environment* env,
115 HandleScope scope(env->isolate());
116 InitializeGlobalTemplates(env->isolate_data());
117 Local<ObjectTemplate> object_template = env->contextify_global_template();
126 : env->isolate()->GetCurrentContext()->GetMicrotaskQueue();
129 if (!(CreateV8Context(env->isolate(), object_template, snapshot_data, queue)
134 return New(v8_context, env, sandbox_obj, options);
144 ContextifyContext::ContextifyContext(Environment* env,
148 : BaseObject(env, wrapper),
150 context_.Reset(env->isolate(), v8_context);
165 Isolate* isolate = env()->isolate();
168 env()->UntrackContext(PersistentToLocal::Weak(isolate, context_));
246 Environment* env,
249 HandleScope scope(env->isolate());
258 Local<Context> main_context = env->context();
280 Utf8Value name_val(env->isolate(), options.name);
283 Utf8Value origin_val(env->isolate(), options.origin);
292 if (!ctor_name->Equals(v8_context, env->object_string()).FromMaybe(false) &&
296 v8::Symbol::GetToStringTag(env->isolate()),
302 env->AssignToContext(v8_context, nullptr, info);
304 if (!env->contextify_wrapper_template()
311 MakeBaseObject<ContextifyContext>(env, wrapper, v8_context, options);
318 v8_context, env->contextify_context_private_symbol(), wrapper)
326 void ContextifyContext::Init(Environment* env, Local<Object> target) {
327 Local<Context> context = env->context();
353 Environment* env = Environment::GetCurrent(args);
362 env->context(),
363 env->contextify_context_private_symbol()).FromJust());
382 !env->microtask_queue_ctor_template().IsEmpty() &&
383 env->microtask_queue_ctor_template()->HasInstance(args[5])) {
388 TryCatchScope try_catch(env);
390 ContextifyContext::New(env, sandbox, options);
401 Environment* env = Environment::GetCurrent(args);
407 sandbox->HasPrivate(env->context(),
408 env->contextify_context_private_symbol());
421 Environment* env,
425 ->GetPrivate(env->context(), env->contextify_context_private_symbol())
540 Environment* env = Environment::GetCurrent(context);
545 if (desc_obj->HasOwnProperty(context, env->get_string()).FromMaybe(false) ||
546 desc_obj->HasOwnProperty(context, env->set_string()).FromMaybe(false))
741 void ContextifyScript::Init(Environment* env, Local<Object> target) {
742 Isolate* isolate = env->isolate();
743 HandleScope scope(env->isolate());
745 FIXED_ONE_BYTE_STRING(env->isolate(), "ContextifyScript");
754 Local<Context> context = env->context();
758 env->set_script_context_constructor_template(script_tmpl);
769 Environment* env = Environment::GetCurrent(args);
770 Isolate* isolate = env->isolate();
771 Local<Context> context = env->context();
810 env, args[6].As<Object>());
819 new ContextifyScript(env, args.This());
860 TryCatchScope try_catch(env);
861 ShouldNotAbortOnUncaughtScope no_abort_scope(env);
869 errors::DecorateErrorStack(env, try_catch);
888 ->SetPrivate(context, env->host_defined_option_symbol(), id_symbol)
893 if (StoreCodeCacheResult(env,
904 ->Set(env->context(),
905 env->source_map_url_string(),
914 Environment* env,
928 env->cached_data_rejected_string(),
929 Boolean::New(env->isolate(), source.GetCachedData()->rejected))
938 Buffer::Copy(env,
941 if (target->Set(context, env->cached_data_string(), buf.ToLocalChecked())
948 env->cached_data_produced_string(),
949 Boolean::New(env->isolate(), cached_data_produced))
957 bool ContextifyScript::InstanceOf(Environment* env,
960 env->script_context_constructor_template()->HasInstance(value);
965 Environment* env = Environment::GetCurrent(args);
969 PersistentToLocal::Default(env->isolate(), wrapped_script->script_);
973 args.GetReturnValue().Set(Buffer::New(env, 0).ToLocalChecked());
976 env,
984 Environment* env = Environment::GetCurrent(args);
999 ContextifyContext::ContextFromContextifiedSandbox(env, sandbox);
1001 CHECK_EQ(contextify_context->env(), env);
1008 context = env->context();
1014 int64_t timeout = args[1]->IntegerValue(env->context()).FromJust();
1027 env,
1037 Environment* env,
1046 if (!env->can_call_into_js())
1048 if (!ContextifyScript::InstanceOf(env, args.Holder())) {
1050 env,
1055 TryCatchScope try_catch(env);
1056 Isolate::SafeForTerminationScope safe_for_termination(env->isolate());
1060 PersistentToLocal::Default(env->isolate(), wrapped_script->script_);
1065 env->inspector_agent()->PauseOnNextJavascriptStatement("Break on start");
1075 mtask_queue->PerformCheckpoint(env->isolate());
1079 Watchdog wd(env->isolate(), timeout, &timed_out);
1080 SigintWatchdog swd(env->isolate(), &received_signal);
1083 SigintWatchdog swd(env->isolate(), &received_signal);
1086 Watchdog wd(env->isolate(), timeout, &timed_out);
1094 if (!env->is_main_thread() && env->is_stopping())
1096 env->isolate()->CancelTerminateExecution();
1101 node::THROW_ERR_SCRIPT_EXECUTION_TIMEOUT(env, timeout);
1103 node::THROW_ERR_SCRIPT_EXECUTION_INTERRUPTED(env);
1110 errors::DecorateErrorStack(env, try_catch);
1129 ContextifyScript::ContextifyScript(Environment* env, Local<Object> object)
1130 : BaseObject(env, object) {
1138 Environment* env = Environment::GetCurrent(args);
1139 Isolate* isolate = env->isolate();
1140 Local<Context> context = env->context();
1175 env, args[6].As<Object>());
1234 TryCatchScope try_catch(env);
1272 errors::DecorateErrorStack(env, try_catch);
1277 if (fn->SetPrivate(context, env->host_defined_option_symbol(), id_symbol)
1283 if (result->Set(parsing_context, env->function_string(), fn).IsNothing())
1287 env->source_map_url_string(),
1296 if (StoreCodeCacheResult(env,
1347 MicrotaskQueueWrap::MicrotaskQueueWrap(Environment* env, Local<Object> obj)
1348 : BaseObject(env, obj),
1350 MicrotaskQueue::New(env->isolate(), MicrotasksPolicy::kExplicit)) {
1364 void MicrotaskQueueWrap::Init(Environment* env, Local<Object> target) {
1365 Isolate* isolate = env->isolate();
1367 Local<Context> context = env->context();
1371 env->set_microtask_queue_ctor_template(tmpl);
1384 Environment* env = Environment::GetCurrent(context);
1385 Isolate* isolate = env->isolate();
1386 ContextifyContext::Init(env, target);
1387 ContextifyScript::Init(env, target);
1388 MicrotaskQueueWrap::Init(env, target);
1396 Local<Object> constants = Object::New(env->isolate());
1397 Local<Object> measure_memory = Object::New(env->isolate());
1398 Local<Object> memory_execution = Object::New(env->isolate());
1401 Local<Object> memory_mode = Object::New(env->isolate());
1419 target->Set(context, env->constants_string(), constants).Check();