Lines Matching defs:context

66     Local<Context> context, ValueDeserializer* deserializer) {
73 Local<Context> context, ValueSerializer* serializer) {
110 Local<Context> context = isolate->GetCurrentContext();
112 if (!deserializer->ReadValue(context).ToLocal(&object))
142 Local<Context> context,
144 Context::Scope context_scope(context);
172 env, context, std::move(transferables_[i]));
183 if (port_list_array->Set(context,
217 if (deserializer.ReadHeader(context).IsNothing())
220 if (!deserializer.ReadValue(context).ToLocal(&return_value))
224 if (base_object->FinalizeTransferRead(context, &deserializer).IsNothing())
248 MaybeLocal<Function> GetEmitMessageFunction(Local<Context> context) {
249 Isolate* isolate = context->GetIsolate();
252 if (!GetPerContextExports(context).ToLocal(&per_context_bindings) ||
253 !per_context_bindings->Get(context,
262 MaybeLocal<Function> GetDOMException(Local<Context> context) {
263 Isolate* isolate = context->GetIsolate();
266 if (!GetPerContextExports(context).ToLocal(&per_context_bindings) ||
267 !per_context_bindings->Get(context,
277 void ThrowDataCloneException(Local<Context> context, Local<String> message) {
278 Isolate* isolate = context->GetIsolate();
283 if (!GetDOMException(context).ToLocal(&domexception_ctor) ||
284 !domexception_ctor->NewInstance(context, arraysize(argv), argv)
296 SerializerDelegate(Environment* env, Local<Context> context, Message* m)
297 : env_(env), context_(context), msg_(m) {}
319 env_->env_vars()->AssignToObject(isolate, env_->context(), normal_object);
321 return serializer->WriteValue(env_->context(), normal_object);
350 Maybe<bool> Finish(Local<Context> context) {
359 if (data->FinalizeTransferWrite(context, serializer).IsNothing())
435 Local<Context> context,
440 Context::Scope context_scope(context);
445 SerializerDelegate delegate(env, context, this);
457 context,
481 context,
497 context,
508 context,
518 context,
540 if (serializer.WriteValue(context, input).IsNothing()) {
552 if (delegate.Finish(context).IsNothing())
610 Local<Context> context,
631 if (!wrap->Get(context, env->oninit_symbol()).ToLocal(&fn))
636 if (init->Call(context, wrap, 0, nullptr).IsEmpty())
641 if (!GetEmitMessageFunction(context).ToLocal(&emit_message_fn))
681 Local<Context> context,
684 Context::Scope context_scope(context);
690 if (!ctor_templ->InstanceTemplate()->NewInstance(context).ToLocal(&instance))
692 MessagePort* port = new MessagePort(env, context, instance);
718 MaybeLocal<Value> MessagePort::ReceiveMessage(Local<Context> context,
752 return received->Deserialize(env(), context, port_list);
758 Local<Context> context =
788 Context::Scope context_scope(context);
800 if (!ReceiveMessage(context, mode, &port_list).ToLocal(&payload)) {
863 Local<Context> context,
866 env, context,
871 Local<Context> context,
883 msg->Serialize(env, context, message_v, transfer_v, obj);
914 Local<Context> context,
925 if (!arr->Get(context, i).ToLocal(&transfer_list[i]))
933 if (!object.As<Object>()->Get(context, Symbol::GetIterator(isolate))
938 if (!iterator_method.As<Function>()->Call(context, object, 0, nullptr)
943 if (!iterator.As<Object>()->Get(context, env->next_string()).ToLocal(&next))
950 if (!next.As<Function>()->Call(context, iterator, 0, nullptr)
955 if (!result.As<Object>()->Get(context, env->done_string()).ToLocal(&done))
960 if (!result.As<Object>()->Get(context, env->value_string()).ToLocal(&val))
973 Local<Context> context = obj->GetCreationContext().ToLocalChecked();
990 if (!ReadIterable(env, context, transfer_list, args[1]).To(&was_iterable))
994 if (!args[1].As<Object>()->Get(context, env->transfer_string())
997 if (!ReadIterable(env, context, transfer_list, transfer_option)
1013 USE(msg.Serialize(env, context, args[0], transfer_list, obj));
1017 Maybe<bool> res = port->PostMessage(env, context, args[0], transfer_list);
1107 return THROW_ERR_INVALID_ARG_TYPE(env, "Invalid context argument");
1114 Context::Scope context_scope(context_wrapper->context());
1116 MessagePort::New(env, context_wrapper->context(), std::move(data));
1174 if (!object()->Has(env()->context(),
1197 Local<Context> context = env()->isolate()->GetCurrentContext();
1202 if (!object()->Get(context, method_name).ToLocal(&method)) {
1208 context, object(), 0, nullptr).ToLocal(&result_v)) {
1216 if (!result->Get(context, env()->data_string()).ToLocal(&data) ||
1217 !result->Get(context, env()->deserialize_info_string())
1238 Local<Context> context = env()->isolate()->GetCurrentContext();
1242 if (!object()->Get(context, method_name).ToLocal(&method)) {
1249 context, object(), 0, nullptr).ToLocal(&list_v)) {
1258 if (!list->Get(context, i).ToLocal(&value))
1267 Local<Context> context, ValueDeserializer* deserializer) {
1272 if (!deserializer->ReadValue(context).ToLocal(&data)) return Nothing<bool>();
1276 if (!object()->Get(context, method_name).ToLocal(&method)) {
1281 if (method.As<Function>()->Call(context, object(), 1, &data).IsEmpty()) {
1294 Local<Context> context,
1302 if (context != env->context()) {
1308 if (!ToV8Value(context, deserialize_info_).ToLocal(&info)) return {};
1313 context, Null(env->isolate()), 1, &info).ToLocal(&ret) ||
1322 Local<Context> context, ValueSerializer* serializer) {
1323 HandleScope handle_scope(context->GetIsolate());
1324 auto ret = serializer->WriteValue(context, PersistentToLocal::Strong(data_));
1447 Local<Context> context = args.This()->GetCreationContext().ToLocalChecked();
1448 Context::Scope context_scope(context);
1450 MessagePort* port1 = MessagePort::New(env, context);
1452 MessagePort* port2 = MessagePort::New(env, context);
1460 args.This()->Set(context, env->port1_string(), port1->object())
1462 args.This()->Set(context, env->port2_string(), port2->object())
1469 Context::Scope context_scope(env->context());
1472 MessagePort::New(env, env->context(), {}, SiblingGroup::Get(*name));
1480 Local<Context> context,
1482 Environment* env = Environment::GetCurrent(context);
1486 SetConstructorFunction(context,
1500 context, target, "JSTransferable", t, SetConstructorFunctionFlag::NONE);
1503 SetConstructorFunction(context,
1511 SetMethod(context, target, "stopMessagePort", MessagePort::Stop);
1512 SetMethod(context, target, "checkMessagePort", MessagePort::CheckType);
1513 SetMethod(context, target, "drainMessagePort", MessagePort::Drain);
1515 context, target, "receiveMessageOnPort", MessagePort::ReceiveMessage);
1517 context, target, "moveMessagePortToContext", MessagePort::MoveToContext);
1518 SetMethod(context,
1522 SetMethod(context, target, "broadcastChannel", BroadcastChannel);
1525 Local<Function> domexception = GetDOMException(context).ToLocalChecked();
1527 ->Set(context,