Lines Matching defs:context
162 env()->context(),
175 ->Set(env()->context(),
203 void Environment::TrackContext(Local<Context> context) {
206 contexts_[id].Reset(isolate_, context);
210 void Environment::UntrackContext(Local<Context> context) {
218 if (saved_context == context) {
538 USE(cb->Call(env_->context(), Undefined(isolate), arraysize(args), args));
541 void Environment::AssignToContext(Local<v8::Context> context,
544 context->SetAlignedPointerInEmbedderData(ContextEmbedderIndex::kEnvironment,
546 context->SetAlignedPointerInEmbedderData(ContextEmbedderIndex::kRealm, realm);
548 context->SetAlignedPointerInEmbedderData(
553 context->SetAlignedPointerInEmbedderData(
556 // This must not be done before other context fields are initialized.
557 ContextEmbedderTag::TagNodeContext(context);
560 inspector_agent()->ContextCreated(context, info);
563 this->async_hooks()->InstallPromiseHooks(context);
564 TrackContext(context);
688 // We'll be creating new objects so make sure we've entered the context.
752 Local<Context> context,
759 context->GetIsolate(),
765 InitializeMainContext(context, env_info);
768 void Environment::InitializeMainContext(Local<Context> context,
771 this, context, MAYBE_FIELD_PTR(env_info, principal_realm));
772 AssignToContext(context, principal_realm_.get(), ContextInfo(""));
800 Local<Context> ctx = context();
837 // Destroy inspector agent before erasing the context. The inspector
838 // destructor depends on the context still being accessible.
871 Context::Scope context_scope(context());
897 Context::Scope context_scope(env->context());
1010 Context::Scope context_scope(context());
1012 context(), v8::Undefined(isolate()), 0, nullptr));
1020 Context::Scope context_scope(context());
1022 context(), v8::Undefined(isolate()), 0, nullptr));
1195 Context::Scope context_scope(env->context());
1209 ret = cb->Call(env->context(), process, 1, &arg);
1228 ret.ToLocalChecked()->IntegerValue(env->context()).FromJust();
1253 Context::Scope context_scope(env->context());
1304 obj->Set(env->context(),
1308 obj->Set(env->context(), env->code_string(),
1312 obj->Set(env->context(), env->message_string(),
1320 obj->Set(env->context(), env->path_string(), path_buffer).Check();
1327 obj->Set(env->context(), env->dest_string(), dest_buffer).Check();
1331 obj->Set(env->context(), env->syscall_string(),
1360 Local<Context> context, SnapshotCreator* creator) {
1361 return {fields_.Serialize(context, creator)};
1364 void ImmediateInfo::Deserialize(Local<Context> context) {
1365 fields_.Deserialize(context);
1378 TickInfo::SerializeInfo TickInfo::Serialize(Local<Context> context,
1380 return {fields_.Serialize(context, creator)};
1383 void TickInfo::Deserialize(Local<Context> context) {
1384 fields_.Deserialize(context);
1421 // context which is different from a default context.
1425 // context during bootstrap (code that runs before entering uv_run()).
1430 void AsyncHooks::Deserialize(Local<Context> context) {
1431 async_ids_stack_.Deserialize(context);
1432 fields_.Deserialize(context);
1433 async_id_fields_.Deserialize(context);
1438 context->GetDataFromSnapshotOnce<Array>(
1441 js_execution_async_resources = Array::New(context->GetIsolate());
1444 context->GetIsolate(), js_execution_async_resources);
1453 Local<Object> obj = context->GetDataFromSnapshotOnce<Object>(
1456 js_execution_async_resources->Set(context, i, obj).Check();
1475 AsyncHooks::SerializeInfo AsyncHooks::Serialize(Local<Context> context,
1479 info.async_ids_stack = async_ids_stack_.Serialize(context, creator);
1480 info.fields = fields_.Serialize(context, creator);
1481 info.async_id_fields = async_id_fields_.Serialize(context, creator);
1484 context, js_execution_async_resources_.Get(context->GetIsolate()));
1496 context,
1521 env()->context(),
1606 Local<Context> ctx = context();
1619 // For now we only support serialization of the main context.
1622 CHECK_EQ(contexts_[0], context());
1637 Local<Context> ctx = context();
1650 Local<Context> ctx = context();